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:
shipments (alias: vnob)(name, status, value, id)
schedules(status, type, amount, level)
Task: Select code from shipments where level exists in schedules for the same code.
SQL: | SELECT code FROM shipments AS vnob
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03100 | train |
v2 | Schema:
categories (alias: egiv)(salary, date, value, status)
branches(amount, id, level, name)
Task: Find code from categories where a matching record exists in branches with the same type.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03101 | train |
v1 | Schema:
customers (alias: lex)(salary, id, level, date)
orders(code, status, amount, level)
Task: Retrieve salary from customers whose code is found in orders rows where id matches the outer record.
SQL: | SELECT salary FROM customers AS lex
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03102 | train |
v1 | Schema:
customers (alias: lex)(code, type, date, status)
invoices(id, status, code, value)
Task: Retrieve amount from customers whose type is found in invoices rows where id matches the outer record.
SQL: | SELECT amount FROM customers AS lex
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03103 | train |
v3 | Schema:
projects (alias: uliv)(code, amount, id, date)
customers(value, status, level, code)
Task: Find salary from projects where value exceeds the average salary from customers for the same code.
SQL: | SELECT salary FROM projects AS uliv
WHERE value > (
SELECT AVG(salary) FROM customers AS lex
WHERE lex.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "customers",
"outer_alias": "uliv",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03104 | train |
v1 | Schema:
accounts (alias: jac)(value, salary, id, level)
invoices(type, level, status, id)
Task: Select id from accounts where status exists in invoices for the same status.
SQL: | SELECT id FROM accounts AS jac
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03105 | train |
v3 | Schema:
sales (alias: cif)(code, value, status, type)
employees(amount, value, type, code)
Task: Find value from sales where value exceeds the total amount from employees for the same status.
SQL: | SELECT value FROM sales AS cif
WHERE value > (
SELECT SUM(amount) FROM employees AS bev
WHERE bev.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03106 | train |
v3 | Schema:
invoices (alias: fal)(status, code, type, date)
orders(name, type, salary, level)
Task: Retrieve value from invoices with amount above the SUM(value) of orders rows sharing the same status.
SQL: | SELECT value FROM invoices AS fal
WHERE amount > (
SELECT SUM(value) FROM orders AS kab
WHERE kab.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03107 | train |
v1 | Schema:
schedules (alias: vmob)(level, type, date, id)
tasks(code, status, salary, level)
Task: Find value from schedules where status appears in tasks entries with matching id.
SQL: | SELECT value FROM schedules AS vmob
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "tasks",
"outer_alias": "vmob",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03108 | train |
v3 | Schema:
categories (alias: egiv)(value, date, type, id)
employees(name, level, id, date)
Task: Find amount from categories where value exceeds the total amount from employees for the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE value > (
SELECT SUM(amount) FROM employees AS bev
WHERE bev.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03109 | train |
v3 | Schema:
orders (alias: kab)(name, date, code, amount)
regions(status, level, name, value)
Task: Retrieve amount from orders with salary above the MAX(amount) of regions rows sharing the same code.
SQL: | SELECT amount FROM orders AS kab
WHERE salary > (
SELECT MAX(amount) FROM regions AS okiv
WHERE okiv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03110 | train |
v3 | Schema:
regions (alias: okiv)(type, name, value, level)
departments(date, status, name, code)
Task: Retrieve salary from regions with value above the AVG(salary) of departments rows sharing the same code.
SQL: | SELECT salary FROM regions AS okiv
WHERE value > (
SELECT AVG(salary) FROM departments AS dov
WHERE dov.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03111 | train |
v3 | Schema:
branches (alias: agov)(code, status, level, date)
items(status, amount, salary, date)
Task: Find id from branches where amount exceeds the count of salary from items for the same type.
SQL: | SELECT id FROM branches AS agov
WHERE amount > (
SELECT COUNT(salary) FROM items AS ikob
WHERE ikob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03112 | train |
v2 | Schema:
customers (alias: lex)(value, date, id, amount)
shipments(code, id, date, status)
Task: Find salary from customers where a matching record exists in shipments with the same id.
SQL: | SELECT salary FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "lex",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03113 | train |
v2 | Schema:
employees (alias: bev)(name, id, type, amount)
managers(type, date, code, amount)
Task: Find id from employees where a matching record exists in managers with the same type.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "bev",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03114 | train |
v2 | Schema:
regions (alias: okiv)(type, date, salary, name)
accounts(level, name, status, value)
Task: Find id from regions where a matching record exists in accounts with the same code.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "accounts",
"outer_alias": "okiv",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03115 | train |
v1 | Schema:
projects (alias: uliv)(id, name, code, salary)
orders(value, salary, amount, date)
Task: Find code from projects where code appears in orders entries with matching type.
SQL: | SELECT code FROM projects AS uliv
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "orders",
"outer_alias": "uliv",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03116 | train |
v3 | Schema:
sales (alias: cif)(salary, status, level, code)
products(level, code, id, salary)
Task: Find code from sales where value exceeds the maximum value from products for the same code.
SQL: | SELECT code FROM sales AS cif
WHERE value > (
SELECT MAX(value) FROM products AS nad
WHERE nad.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03117 | train |
v1 | Schema:
sales (alias: cif)(status, name, type, code)
accounts(code, id, date, type)
Task: Select amount from sales where id exists in accounts for the same level.
SQL: | SELECT amount FROM sales AS cif
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "accounts",
"outer_alias": "cif",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03118 | train |
v1 | Schema:
transactions (alias: gev)(value, date, status, id)
categories(salary, level, id, date)
Task: Retrieve amount from transactions whose level is found in categories rows where code matches the outer record.
SQL: | SELECT amount FROM transactions AS gev
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03119 | train |
v1 | Schema:
branches (alias: agov)(value, code, date, amount)
staff(salary, date, value, name)
Task: Select code from branches where level exists in staff for the same type.
SQL: | SELECT code 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": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03120 | train |
v3 | Schema:
branches (alias: agov)(name, salary, status, id)
shipments(amount, level, status, date)
Task: Find id from branches where salary exceeds the average amount from shipments for the same code.
SQL: | SELECT id FROM branches AS agov
WHERE salary > (
SELECT AVG(amount) FROM shipments AS vnob
WHERE vnob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03121 | train |
v3 | Schema:
managers (alias: hac)(salary, name, code, level)
categories(level, type, code, status)
Task: Find code from managers where amount exceeds the average salary from categories for the same level.
SQL: | SELECT code FROM managers AS hac
WHERE amount > (
SELECT AVG(salary) FROM categories AS egiv
WHERE egiv.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03122 | train |
v3 | Schema:
transactions (alias: gev)(date, name, code, level)
invoices(status, type, level, amount)
Task: Find name from transactions where value exceeds the maximum amount from invoices for the same status.
SQL: | SELECT name FROM transactions AS gev
WHERE value > (
SELECT MAX(amount) FROM invoices AS fal
WHERE fal.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03123 | train |
v2 | Schema:
categories (alias: egiv)(amount, date, name, code)
invoices(salary, amount, type, id)
Task: Retrieve salary from categories that have at least one corresponding entry in invoices sharing the same type.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03124 | train |
v3 | Schema:
projects (alias: uliv)(name, status, salary, value)
schedules(date, type, level, salary)
Task: Retrieve salary from projects with value above the AVG(amount) of schedules rows sharing the same type.
SQL: | SELECT salary FROM projects AS uliv
WHERE value > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03125 | train |
v2 | Schema:
invoices (alias: fal)(level, code, amount, id)
transactions(level, amount, value, status)
Task: Retrieve code from invoices that have at least one corresponding entry in transactions sharing the same code.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03126 | train |
v1 | Schema:
managers (alias: hac)(id, level, type, name)
schedules(status, id, type, amount)
Task: Select code from managers where id exists in schedules for the same code.
SQL: | SELECT code FROM managers AS hac
WHERE id IN (
SELECT id FROM schedules AS vmob
WHERE vmob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03127 | train |
v2 | Schema:
transactions (alias: gev)(amount, level, value, date)
orders(status, value, salary, amount)
Task: Find salary from transactions where a matching record exists in orders with the same status.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03128 | train |
v2 | Schema:
tasks (alias: znob)(level, date, name, code)
orders(status, salary, code, type)
Task: Retrieve code from tasks that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03129 | train |
v2 | Schema:
regions (alias: okiv)(level, amount, name, id)
categories(date, amount, status, value)
Task: Retrieve amount from regions that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03130 | train |
v1 | Schema:
departments (alias: dov)(status, amount, name, code)
staff(value, level, code, salary)
Task: Select id from departments where id exists in staff for the same type.
SQL: | SELECT id FROM departments AS dov
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03131 | train |
v2 | Schema:
employees (alias: bev)(status, name, value, id)
requests(code, type, level, status)
Task: Find name from employees where a matching record exists in requests with the same level.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "requests",
"outer_alias": "bev",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03132 | train |
v3 | Schema:
managers (alias: hac)(value, level, type, id)
projects(amount, value, id, salary)
Task: Find name from managers where amount exceeds the maximum amount from projects for the same type.
SQL: | SELECT name FROM managers AS hac
WHERE amount > (
SELECT MAX(amount) FROM projects AS uliv
WHERE uliv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03133 | train |
v2 | Schema:
requests (alias: ejof)(type, name, code, level)
shipments(salary, amount, value, date)
Task: Retrieve amount from requests that have at least one corresponding entry in shipments sharing the same code.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03134 | train |
v3 | Schema:
products (alias: nad)(level, type, value, status)
schedules(status, amount, name, salary)
Task: Retrieve salary from products with salary above the COUNT(value) of schedules rows sharing the same code.
SQL: | SELECT salary FROM products AS nad
WHERE salary > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03135 | train |
v2 | Schema:
shipments (alias: vnob)(id, status, name, amount)
employees(date, salary, value, id)
Task: Retrieve code from shipments that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03136 | train |
v2 | Schema:
requests (alias: ejof)(level, code, type, amount)
tasks(id, level, salary, type)
Task: Find name from requests where a matching record exists in tasks with the same level.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03137 | train |
v1 | Schema:
customers (alias: lex)(date, amount, type, salary)
products(name, amount, code, salary)
Task: Find salary from customers where code appears in products entries with matching code.
SQL: | SELECT salary FROM customers AS lex
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03138 | train |
v3 | Schema:
tasks (alias: znob)(name, status, level, id)
accounts(id, level, salary, name)
Task: Retrieve name from tasks with amount above the COUNT(salary) of accounts rows sharing the same id.
SQL: | SELECT name FROM tasks AS znob
WHERE amount > (
SELECT COUNT(salary) FROM accounts AS jac
WHERE jac.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03139 | train |
v2 | Schema:
managers (alias: hac)(value, status, name, salary)
categories(date, status, type, id)
Task: Find name from managers where a matching record exists in categories with the same level.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03140 | train |
v3 | Schema:
categories (alias: egiv)(name, code, value, level)
regions(status, id, level, type)
Task: Find code from categories where salary exceeds the maximum salary from regions for the same status.
SQL: | SELECT code FROM categories AS egiv
WHERE salary > (
SELECT MAX(salary) FROM regions AS okiv
WHERE okiv.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03141 | train |
v3 | Schema:
transactions (alias: gev)(salary, value, date, id)
projects(name, salary, type, amount)
Task: Retrieve amount from transactions with amount above the SUM(value) of projects rows sharing the same code.
SQL: | SELECT amount FROM transactions AS gev
WHERE amount > (
SELECT SUM(value) FROM projects AS uliv
WHERE uliv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03142 | train |
v1 | Schema:
departments (alias: dov)(id, status, date, amount)
branches(id, type, amount, salary)
Task: Select id from departments where status exists in branches for the same level.
SQL: | SELECT id FROM departments AS dov
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03143 | train |
v3 | Schema:
products (alias: nad)(date, value, level, salary)
requests(code, salary, level, status)
Task: Retrieve name from products with amount above the COUNT(amount) of requests rows sharing the same level.
SQL: | SELECT name FROM products AS nad
WHERE amount > (
SELECT COUNT(amount) FROM requests AS ejof
WHERE ejof.level = nad.level
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03144 | train |
v1 | Schema:
items (alias: ikob)(code, name, status, value)
schedules(name, value, amount, code)
Task: Find code from items where code appears in schedules entries with matching id.
SQL: | SELECT code FROM items AS ikob
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03145 | train |
v1 | Schema:
departments (alias: dov)(level, status, name, amount)
transactions(salary, type, code, amount)
Task: Retrieve code from departments whose status is found in transactions rows where status matches the outer record.
SQL: | SELECT code FROM departments AS dov
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03146 | train |
v1 | Schema:
employees (alias: bev)(type, id, amount, name)
regions(id, salary, amount, value)
Task: Select code from employees where code exists in regions for the same status.
SQL: | SELECT code FROM employees AS bev
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03147 | train |
v3 | Schema:
schedules (alias: vmob)(value, amount, code, status)
projects(name, value, status, id)
Task: Find value from schedules where salary exceeds the maximum value from projects for the same type.
SQL: | SELECT value FROM schedules AS vmob
WHERE salary > (
SELECT MAX(value) FROM projects AS uliv
WHERE uliv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "projects",
"outer_alias": "vmob",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03148 | train |
v2 | Schema:
departments (alias: dov)(id, level, status, type)
schedules(code, name, date, id)
Task: Find salary from departments where a matching record exists in schedules with the same status.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03149 | train |
v1 | Schema:
employees (alias: bev)(salary, status, type, name)
shipments(status, name, value, code)
Task: Find salary from employees where code appears in shipments entries with matching status.
SQL: | SELECT salary FROM employees AS bev
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03150 | train |
v1 | Schema:
schedules (alias: vmob)(date, name, amount, salary)
regions(value, id, code, name)
Task: Select code from schedules where id exists in regions for the same id.
SQL: | SELECT code FROM schedules AS vmob
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "regions",
"outer_alias": "vmob",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03151 | train |
v3 | Schema:
tasks (alias: znob)(status, date, name, level)
managers(salary, name, value, id)
Task: Retrieve amount from tasks with value above the SUM(amount) of managers rows sharing the same level.
SQL: | SELECT amount FROM tasks AS znob
WHERE value > (
SELECT SUM(amount) FROM managers AS hac
WHERE hac.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03152 | train |
v2 | Schema:
items (alias: ikob)(level, name, code, salary)
projects(value, name, type, salary)
Task: Find id from items where a matching record exists in projects with the same level.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03153 | train |
v1 | Schema:
orders (alias: kab)(value, code, status, date)
items(name, code, amount, level)
Task: Find amount from orders where id appears in items entries with matching id.
SQL: | SELECT amount FROM orders AS kab
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "items",
"outer_alias": "kab",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03154 | train |
v3 | Schema:
shipments (alias: vnob)(code, id, value, level)
invoices(id, value, status, type)
Task: Retrieve value from shipments with amount above the SUM(salary) of invoices rows sharing the same type.
SQL: | SELECT value FROM shipments AS vnob
WHERE amount > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03155 | train |
v2 | Schema:
transactions (alias: gev)(type, status, code, id)
customers(date, name, status, amount)
Task: Retrieve id from transactions that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03156 | train |
v2 | Schema:
customers (alias: lex)(date, amount, code, type)
employees(salary, id, type, level)
Task: Find value from customers where a matching record exists in employees with the same id.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03157 | train |
v3 | Schema:
projects (alias: uliv)(level, code, amount, type)
categories(type, level, name, value)
Task: Retrieve name from projects with salary above the SUM(salary) of categories rows sharing the same status.
SQL: | SELECT name FROM projects AS uliv
WHERE salary > (
SELECT SUM(salary) FROM categories AS egiv
WHERE egiv.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03158 | train |
v2 | Schema:
products (alias: nad)(date, status, type, id)
transactions(status, id, salary, level)
Task: Find name from products where a matching record exists in transactions with the same id.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = nad.id
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03159 | train |
v3 | Schema:
managers (alias: hac)(name, amount, salary, status)
regions(name, level, type, code)
Task: Find amount from managers where amount exceeds the minimum value from regions for the same status.
SQL: | SELECT amount FROM managers AS hac
WHERE amount > (
SELECT MIN(value) FROM regions AS okiv
WHERE okiv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03160 | train |
v2 | Schema:
orders (alias: kab)(status, date, salary, name)
accounts(name, salary, date, level)
Task: Retrieve amount from orders that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03161 | train |
v2 | Schema:
employees (alias: bev)(type, date, salary, value)
tasks(type, value, date, name)
Task: Find name from employees where a matching record exists in tasks with the same status.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03162 | train |
v1 | Schema:
customers (alias: lex)(type, status, date, name)
branches(status, amount, value, level)
Task: Find code from customers where id appears in branches entries with matching code.
SQL: | SELECT code FROM customers AS lex
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03163 | train |
v3 | Schema:
items (alias: ikob)(code, status, amount, date)
invoices(date, code, salary, status)
Task: Find id from items where value exceeds the minimum amount from invoices for the same id.
SQL: | SELECT id FROM items AS ikob
WHERE value > (
SELECT MIN(amount) FROM invoices AS fal
WHERE fal.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03164 | train |
v2 | Schema:
departments (alias: dov)(amount, type, date, code)
branches(salary, value, date, name)
Task: Find code from departments where a matching record exists in branches with the same type.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03165 | train |
v2 | Schema:
staff (alias: xnob)(salary, value, amount, level)
regions(amount, name, type, id)
Task: Find value from staff where a matching record exists in regions with the same code.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03166 | train |
v2 | Schema:
managers (alias: hac)(type, date, value, code)
tasks(name, type, status, amount)
Task: Find id from managers where a matching record exists in tasks with the same code.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03167 | train |
v1 | Schema:
managers (alias: hac)(date, code, type, amount)
customers(id, level, value, salary)
Task: Retrieve id from managers whose level is found in customers rows where status matches the outer record.
SQL: | SELECT id FROM managers AS hac
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03168 | train |
v2 | Schema:
shipments (alias: vnob)(amount, salary, status, name)
managers(code, name, id, date)
Task: Find id from shipments where a matching record exists in managers with the same status.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "managers",
"outer_alias": "vnob",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03169 | train |
v3 | Schema:
requests (alias: ejof)(level, type, id, date)
tasks(amount, value, level, salary)
Task: Retrieve code from requests with amount above the SUM(value) of tasks rows sharing the same type.
SQL: | SELECT code FROM requests AS ejof
WHERE amount > (
SELECT SUM(value) FROM tasks AS znob
WHERE znob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03170 | train |
v2 | Schema:
accounts (alias: jac)(code, amount, type, date)
products(date, id, amount, name)
Task: Retrieve code from accounts that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "products",
"outer_alias": "jac",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03171 | train |
v2 | Schema:
customers (alias: lex)(amount, salary, type, value)
products(status, name, amount, type)
Task: Find id from customers where a matching record exists in products with the same status.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03172 | train |
v1 | Schema:
managers (alias: hac)(level, date, name, salary)
requests(status, name, code, salary)
Task: Select name from managers where code exists in requests for the same level.
SQL: | SELECT name FROM managers AS hac
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "hac",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03173 | train |
v2 | Schema:
invoices (alias: fal)(level, status, name, type)
transactions(salary, amount, level, status)
Task: Retrieve code from invoices that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03174 | train |
v3 | Schema:
sales (alias: cif)(amount, value, id, type)
invoices(id, value, level, salary)
Task: Find code from sales where salary exceeds the total amount from invoices for the same status.
SQL: | SELECT code FROM sales AS cif
WHERE salary > (
SELECT SUM(amount) FROM invoices AS fal
WHERE fal.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03175 | train |
v2 | Schema:
sales (alias: cif)(name, code, salary, level)
branches(code, name, value, type)
Task: Retrieve amount from sales that have at least one corresponding entry in branches sharing the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03176 | train |
v3 | Schema:
employees (alias: bev)(amount, id, level, salary)
shipments(code, name, date, salary)
Task: Find id from employees where amount exceeds the count of salary from shipments for the same status.
SQL: | SELECT id FROM employees AS bev
WHERE amount > (
SELECT COUNT(salary) FROM shipments AS vnob
WHERE vnob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03177 | train |
v3 | Schema:
staff (alias: xnob)(status, id, value, level)
managers(name, id, value, level)
Task: Retrieve amount from staff with value above the MIN(value) of managers rows sharing the same status.
SQL: | SELECT amount FROM staff AS xnob
WHERE value > (
SELECT MIN(value) FROM managers AS hac
WHERE hac.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03178 | train |
v2 | Schema:
tasks (alias: znob)(name, id, value, level)
staff(name, amount, level, id)
Task: Find salary from tasks where a matching record exists in staff with the same type.
SQL: | SELECT salary 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": "salary",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03179 | train |
v3 | Schema:
sales (alias: cif)(id, code, level, type)
branches(name, status, date, id)
Task: Retrieve name from sales with salary above the MIN(value) of branches rows sharing the same type.
SQL: | SELECT name FROM sales AS cif
WHERE salary > (
SELECT MIN(value) FROM branches AS agov
WHERE agov.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03180 | train |
v3 | Schema:
staff (alias: xnob)(name, type, code, status)
customers(name, status, value, salary)
Task: Retrieve id from staff with value above the MAX(amount) of customers rows sharing the same id.
SQL: | SELECT id FROM staff AS xnob
WHERE value > (
SELECT MAX(amount) FROM customers AS lex
WHERE lex.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03181 | train |
v2 | Schema:
items (alias: ikob)(date, code, salary, level)
categories(id, type, level, value)
Task: Retrieve salary from items that have at least one corresponding entry in categories sharing the same level.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "ikob",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03182 | train |
v3 | Schema:
transactions (alias: gev)(name, value, status, salary)
invoices(name, salary, code, level)
Task: Retrieve name from transactions with salary above the AVG(salary) of invoices rows sharing the same type.
SQL: | SELECT name FROM transactions AS gev
WHERE salary > (
SELECT AVG(salary) FROM invoices AS fal
WHERE fal.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03183 | train |
v3 | Schema:
transactions (alias: gev)(date, level, salary, code)
schedules(id, date, type, status)
Task: Find value from transactions where value exceeds the count of amount from schedules for the same code.
SQL: | SELECT value FROM transactions AS gev
WHERE value > (
SELECT COUNT(amount) FROM schedules AS vmob
WHERE vmob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03184 | train |
v1 | Schema:
projects (alias: uliv)(value, amount, salary, code)
sales(name, value, level, salary)
Task: Select id from projects where level exists in sales for the same status.
SQL: | SELECT id FROM projects AS uliv
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03185 | train |
v2 | Schema:
projects (alias: uliv)(id, date, value, level)
staff(id, amount, type, status)
Task: Find name from projects where a matching record exists in staff with the same status.
SQL: | SELECT name FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03186 | train |
v1 | Schema:
employees (alias: bev)(level, amount, name, value)
projects(value, salary, type, amount)
Task: Select code from employees where status exists in projects for the same status.
SQL: | SELECT code FROM employees AS bev
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03187 | train |
v3 | Schema:
customers (alias: lex)(level, name, date, value)
sales(amount, type, date, id)
Task: Find id from customers where salary exceeds the minimum amount from sales for the same status.
SQL: | SELECT id FROM customers AS lex
WHERE salary > (
SELECT MIN(amount) FROM sales AS cif
WHERE cif.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03188 | train |
v1 | Schema:
invoices (alias: fal)(value, level, amount, id)
requests(date, value, status, type)
Task: Select code from invoices where status exists in requests for the same status.
SQL: | SELECT code FROM invoices AS fal
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "requests",
"outer_alias": "fal",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03189 | train |
v1 | Schema:
shipments (alias: vnob)(status, id, date, amount)
transactions(type, code, name, id)
Task: Retrieve amount from shipments whose type is found in transactions rows where type matches the outer record.
SQL: | SELECT amount FROM shipments AS vnob
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03190 | train |
v2 | Schema:
accounts (alias: jac)(status, date, id, type)
regions(status, value, level, name)
Task: Retrieve salary from accounts that have at least one corresponding entry in regions sharing the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03191 | train |
v3 | Schema:
requests (alias: ejof)(value, salary, date, amount)
staff(name, date, status, id)
Task: Find id from requests where value exceeds the total amount from staff for the same level.
SQL: | SELECT id FROM requests AS ejof
WHERE value > (
SELECT SUM(amount) FROM staff AS xnob
WHERE xnob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03192 | train |
v1 | Schema:
sales (alias: cif)(type, name, amount, status)
customers(value, salary, name, level)
Task: Retrieve name from sales whose level is found in customers rows where code matches the outer record.
SQL: | SELECT name FROM sales AS cif
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03193 | train |
v1 | Schema:
schedules (alias: vmob)(name, amount, value, level)
branches(level, status, date, name)
Task: Find name from schedules where level appears in branches entries with matching type.
SQL: | SELECT name FROM schedules AS vmob
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03194 | train |
v3 | Schema:
managers (alias: hac)(date, type, salary, name)
requests(code, status, id, type)
Task: Retrieve code from managers with salary above the COUNT(value) of requests rows sharing the same type.
SQL: | SELECT code FROM managers AS hac
WHERE salary > (
SELECT COUNT(value) 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": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03195 | train |
v2 | Schema:
categories (alias: egiv)(id, level, code, value)
accounts(salary, name, date, id)
Task: Retrieve salary from categories that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03196 | train |
v3 | Schema:
shipments (alias: vnob)(level, status, date, value)
regions(value, date, id, name)
Task: Retrieve code from shipments with amount above the AVG(amount) of regions rows sharing the same code.
SQL: | SELECT code FROM shipments AS vnob
WHERE amount > (
SELECT AVG(amount) FROM regions AS okiv
WHERE okiv.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03197 | train |
v1 | Schema:
projects (alias: uliv)(id, level, amount, type)
departments(amount, salary, status, value)
Task: Retrieve value from projects whose status is found in departments rows where type matches the outer record.
SQL: | SELECT value FROM projects AS uliv
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03198 | train |
v3 | Schema:
branches (alias: agov)(id, level, value, code)
transactions(id, date, salary, code)
Task: Retrieve salary from branches with salary above the COUNT(value) of transactions rows sharing the same code.
SQL: | SELECT salary FROM branches AS agov
WHERE salary > (
SELECT COUNT(value) FROM transactions AS gev
WHERE gev.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03199 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.