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:
requests (alias: ejof)(code, name, type, amount)
schedules(level, code, name, date)
Task: Retrieve id from requests whose type is found in schedules rows where type matches the outer record.
SQL: | SELECT id FROM requests AS ejof
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01100 | train |
v2 | Schema:
employees (alias: bev)(id, amount, level, code)
departments(value, id, level, amount)
Task: Find name from employees where a matching record exists in departments with the same level.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01101 | train |
v2 | Schema:
projects (alias: uliv)(name, id, salary, status)
items(code, value, level, salary)
Task: Retrieve salary from projects that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01102 | train |
v1 | Schema:
requests (alias: ejof)(type, id, name, level)
tasks(date, value, name, level)
Task: Retrieve code from requests whose code is found in tasks rows where status matches the outer record.
SQL: | SELECT code FROM requests AS ejof
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01103 | train |
v2 | Schema:
items (alias: ikob)(name, type, amount, id)
products(value, salary, type, code)
Task: Retrieve salary from items that have at least one corresponding entry in products sharing the same status.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01104 | train |
v2 | Schema:
items (alias: ikob)(amount, status, name, type)
transactions(amount, level, salary, code)
Task: Retrieve name from items that have at least one corresponding entry in transactions sharing the same code.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "transactions",
"outer_alias": "ikob",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01105 | train |
v1 | Schema:
categories (alias: egiv)(name, amount, type, date)
requests(value, name, date, status)
Task: Find salary from categories where type appears in requests entries with matching status.
SQL: | SELECT salary FROM categories AS egiv
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01106 | train |
v2 | Schema:
requests (alias: ejof)(status, level, name, amount)
sales(code, type, date, value)
Task: Retrieve value from requests that have at least one corresponding entry in sales sharing the same id.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01107 | train |
v2 | Schema:
invoices (alias: fal)(level, date, type, value)
items(code, level, amount, type)
Task: Retrieve code from invoices that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01108 | train |
v2 | Schema:
regions (alias: okiv)(type, salary, value, status)
managers(status, salary, id, amount)
Task: Retrieve salary from regions that have at least one corresponding entry in managers sharing the same code.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01109 | train |
v2 | Schema:
schedules (alias: vmob)(salary, value, id, status)
sales(name, value, status, type)
Task: Retrieve code from schedules that have at least one corresponding entry in sales sharing the same id.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01110 | train |
v2 | Schema:
accounts (alias: jac)(salary, code, level, amount)
employees(salary, level, amount, date)
Task: Find name from accounts where a matching record exists in employees with the same id.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01111 | train |
v3 | Schema:
departments (alias: dov)(salary, date, value, status)
sales(amount, name, id, level)
Task: Find code from departments where value exceeds the average salary from sales for the same type.
SQL: | SELECT code FROM departments AS dov
WHERE value > (
SELECT AVG(salary) FROM sales AS cif
WHERE cif.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01112 | train |
v1 | Schema:
shipments (alias: vnob)(salary, name, status, type)
customers(code, date, amount, id)
Task: Retrieve id from shipments whose type is found in customers rows where level matches the outer record.
SQL: | SELECT id FROM shipments AS vnob
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01113 | train |
v3 | Schema:
tasks (alias: znob)(type, status, salary, value)
categories(status, code, type, id)
Task: Retrieve salary from tasks with amount above the MIN(amount) of categories rows sharing the same status.
SQL: | SELECT salary FROM tasks AS znob
WHERE amount > (
SELECT MIN(amount) FROM categories AS egiv
WHERE egiv.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01114 | train |
v3 | Schema:
customers (alias: lex)(salary, code, type, value)
branches(level, value, type, name)
Task: Find id from customers where amount exceeds the maximum value from branches for the same status.
SQL: | SELECT id FROM customers AS lex
WHERE amount > (
SELECT MAX(value) FROM branches AS agov
WHERE agov.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01115 | train |
v2 | Schema:
orders (alias: kab)(code, value, id, date)
projects(value, date, amount, code)
Task: Find amount from orders where a matching record exists in projects with the same code.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01116 | train |
v1 | Schema:
managers (alias: hac)(date, id, code, status)
customers(status, id, level, name)
Task: Retrieve amount from managers whose level is found in customers rows where level matches the outer record.
SQL: | SELECT amount FROM managers AS hac
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01117 | train |
v3 | Schema:
regions (alias: okiv)(salary, level, status, amount)
tasks(value, code, id, level)
Task: Find code from regions where salary exceeds the maximum amount from tasks for the same id.
SQL: | SELECT code FROM regions AS okiv
WHERE salary > (
SELECT MAX(amount) FROM tasks AS znob
WHERE znob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01118 | train |
v2 | Schema:
invoices (alias: fal)(amount, date, id, level)
managers(salary, name, value, code)
Task: Retrieve value from invoices that have at least one corresponding entry in managers sharing the same code.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01119 | train |
v1 | Schema:
accounts (alias: jac)(salary, type, amount, value)
tasks(level, status, salary, name)
Task: Select value from accounts where id exists in tasks for the same id.
SQL: | SELECT value FROM accounts AS jac
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "tasks",
"outer_alias": "jac",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01120 | train |
v3 | Schema:
sales (alias: cif)(salary, name, date, code)
transactions(date, level, type, salary)
Task: Find amount from sales where amount exceeds the total amount from transactions for the same code.
SQL: | SELECT amount FROM sales AS cif
WHERE amount > (
SELECT SUM(amount) FROM transactions AS gev
WHERE gev.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01121 | train |
v1 | Schema:
requests (alias: ejof)(code, level, name, date)
employees(name, code, level, type)
Task: Find value from requests where type appears in employees entries with matching status.
SQL: | SELECT value FROM requests AS ejof
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01122 | train |
v3 | Schema:
requests (alias: ejof)(name, date, code, level)
regions(code, id, amount, date)
Task: Retrieve name from requests with amount above the SUM(value) of regions rows sharing the same type.
SQL: | SELECT name FROM requests AS ejof
WHERE amount > (
SELECT SUM(value) FROM regions AS okiv
WHERE okiv.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "name",
"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_01123 | train |
v3 | Schema:
customers (alias: lex)(name, value, id, salary)
shipments(salary, name, date, amount)
Task: Retrieve value from customers with salary above the COUNT(value) of shipments rows sharing the same id.
SQL: | SELECT value FROM customers AS lex
WHERE salary > (
SELECT COUNT(value) FROM shipments AS vnob
WHERE vnob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "lex",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01124 | train |
v1 | Schema:
schedules (alias: vmob)(name, status, level, salary)
branches(amount, id, type, salary)
Task: Find code from schedules where code appears in branches entries with matching code.
SQL: | SELECT code FROM schedules AS vmob
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01125 | train |
v1 | Schema:
projects (alias: uliv)(name, id, level, code)
transactions(id, status, level, value)
Task: Select id from projects where level exists in transactions for the same status.
SQL: | SELECT id FROM projects AS uliv
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "transactions",
"outer_alias": "uliv",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01126 | train |
v1 | Schema:
regions (alias: okiv)(id, date, salary, value)
departments(id, level, name, value)
Task: Retrieve value from regions whose code is found in departments rows where status matches the outer record.
SQL: | SELECT value FROM regions AS okiv
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01127 | train |
v3 | Schema:
invoices (alias: fal)(type, code, id, level)
employees(code, id, status, type)
Task: Find amount from invoices where salary exceeds the minimum salary from employees for the same level.
SQL: | SELECT amount FROM invoices AS fal
WHERE salary > (
SELECT MIN(salary) FROM employees AS bev
WHERE bev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01128 | train |
v1 | Schema:
managers (alias: hac)(level, salary, amount, date)
products(status, name, level, id)
Task: Retrieve amount from managers whose level is found in products rows where id matches the outer record.
SQL: | SELECT amount FROM managers AS hac
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "products",
"outer_alias": "hac",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01129 | train |
v2 | Schema:
accounts (alias: jac)(id, value, date, type)
customers(salary, id, type, code)
Task: Find salary from accounts where a matching record exists in customers with the same id.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01130 | train |
v3 | Schema:
schedules (alias: vmob)(value, salary, date, status)
customers(level, id, date, amount)
Task: Find value from schedules where amount exceeds the average value from customers for the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE amount > (
SELECT AVG(value) FROM customers AS lex
WHERE lex.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01131 | train |
v1 | Schema:
transactions (alias: gev)(level, name, date, code)
items(salary, value, date, status)
Task: Find salary from transactions where code appears in items entries with matching level.
SQL: | SELECT salary FROM transactions AS gev
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01132 | train |
v2 | Schema:
schedules (alias: vmob)(status, date, code, type)
categories(value, level, amount, status)
Task: Find name from schedules where a matching record exists in categories with the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01133 | train |
v2 | Schema:
categories (alias: egiv)(date, amount, id, type)
items(value, date, type, amount)
Task: Retrieve code from categories that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01134 | train |
v1 | Schema:
employees (alias: bev)(name, level, value, status)
accounts(status, name, salary, id)
Task: Select id from employees where status exists in accounts for the same level.
SQL: | SELECT id FROM employees AS bev
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01135 | train |
v1 | Schema:
accounts (alias: jac)(code, level, status, date)
regions(status, name, salary, value)
Task: Select salary from accounts where id exists in regions for the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE id IN (
SELECT id 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": "id",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01136 | train |
v2 | Schema:
managers (alias: hac)(salary, type, id, name)
projects(name, value, level, date)
Task: Retrieve code from managers that have at least one corresponding entry in projects sharing the same type.
SQL: | SELECT code FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01137 | train |
v3 | Schema:
products (alias: nad)(date, salary, status, code)
regions(name, amount, status, value)
Task: Retrieve value from products with salary above the SUM(value) of regions rows sharing the same code.
SQL: | SELECT value FROM products AS nad
WHERE salary > (
SELECT SUM(value) FROM regions AS okiv
WHERE okiv.code = nad.code
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01138 | train |
v2 | Schema:
shipments (alias: vnob)(value, salary, name, type)
products(status, id, type, name)
Task: Retrieve value from shipments that have at least one corresponding entry in products sharing the same status.
SQL: | SELECT value FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01139 | train |
v1 | Schema:
projects (alias: uliv)(status, id, amount, salary)
employees(code, level, type, amount)
Task: Select value from projects where status exists in employees for the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01140 | train |
v3 | Schema:
projects (alias: uliv)(name, type, id, date)
staff(type, value, amount, level)
Task: Retrieve value from projects with value above the MAX(value) of staff rows sharing the same type.
SQL: | SELECT value FROM projects AS uliv
WHERE value > (
SELECT MAX(value) FROM staff AS xnob
WHERE xnob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01141 | train |
v1 | Schema:
requests (alias: ejof)(salary, name, date, type)
orders(value, code, date, name)
Task: Select value from requests where level exists in orders for the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01142 | train |
v1 | Schema:
staff (alias: xnob)(name, amount, salary, type)
schedules(name, level, type, date)
Task: Select id from staff where level exists in schedules for the same id.
SQL: | SELECT id FROM staff AS xnob
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01143 | train |
v2 | Schema:
items (alias: ikob)(code, amount, name, id)
orders(date, level, id, status)
Task: Retrieve amount from items that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01144 | train |
v3 | Schema:
accounts (alias: jac)(name, salary, status, code)
employees(code, level, value, type)
Task: Retrieve amount from accounts with salary above the AVG(amount) of employees rows sharing the same id.
SQL: | SELECT amount FROM accounts AS jac
WHERE salary > (
SELECT AVG(amount) FROM employees AS bev
WHERE bev.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01145 | train |
v2 | Schema:
branches (alias: agov)(status, type, value, salary)
categories(type, id, value, level)
Task: Retrieve code from branches that have at least one corresponding entry in categories sharing the same status.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01146 | train |
v2 | Schema:
schedules (alias: vmob)(type, name, status, date)
invoices(value, type, amount, name)
Task: Retrieve code from schedules that have at least one corresponding entry in invoices sharing the same code.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "invoices",
"outer_alias": "vmob",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01147 | train |
v3 | Schema:
departments (alias: dov)(name, type, amount, code)
orders(type, level, value, status)
Task: Find code from departments where value exceeds the count of value from orders for the same level.
SQL: | SELECT code FROM departments AS dov
WHERE value > (
SELECT COUNT(value) FROM orders AS kab
WHERE kab.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01148 | train |
v1 | Schema:
transactions (alias: gev)(value, salary, code, status)
schedules(status, level, date, name)
Task: Select code from transactions where type exists in schedules for the same level.
SQL: | SELECT code FROM transactions AS gev
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01149 | train |
v3 | Schema:
projects (alias: uliv)(status, date, amount, id)
tasks(code, level, type, status)
Task: Find value from projects where amount exceeds the maximum amount from tasks for the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE amount > (
SELECT MAX(amount) FROM tasks AS znob
WHERE znob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01150 | train |
v3 | Schema:
categories (alias: egiv)(amount, salary, level, code)
customers(value, status, level, salary)
Task: Retrieve salary from categories with amount above the MIN(amount) of customers rows sharing the same type.
SQL: | SELECT salary FROM categories AS egiv
WHERE amount > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "customers",
"outer_alias": "egiv",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01151 | train |
v2 | Schema:
managers (alias: hac)(type, salary, code, amount)
invoices(id, code, 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_01152 | train |
v2 | Schema:
orders (alias: kab)(amount, date, type, value)
schedules(status, amount, level, code)
Task: Retrieve name from orders that have at least one corresponding entry in schedules sharing the same id.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01153 | train |
v2 | Schema:
departments (alias: dov)(value, level, id, salary)
branches(value, status, type, code)
Task: Find name from departments where a matching record exists in branches with the same level.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01154 | train |
v1 | Schema:
tasks (alias: znob)(id, date, name, status)
staff(code, name, salary, amount)
Task: Select salary from tasks where status exists in staff for the same status.
SQL: | SELECT salary FROM tasks AS znob
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01155 | train |
v3 | Schema:
items (alias: ikob)(value, id, level, salary)
categories(date, id, status, level)
Task: Find code from items where amount exceeds the maximum salary from categories for the same level.
SQL: | SELECT code FROM items AS ikob
WHERE amount > (
SELECT MAX(salary) FROM categories AS egiv
WHERE egiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "ikob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01156 | train |
v3 | Schema:
items (alias: ikob)(salary, id, date, level)
tasks(status, type, value, id)
Task: Find id from items where value exceeds the minimum salary from tasks for the same code.
SQL: | SELECT id FROM items AS ikob
WHERE value > (
SELECT MIN(salary) FROM tasks AS znob
WHERE znob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01157 | train |
v2 | Schema:
categories (alias: egiv)(status, code, amount, name)
departments(name, date, value, id)
Task: Find name from categories where a matching record exists in departments with the same status.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "departments",
"outer_alias": "egiv",
"inner_alias": "dov",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01158 | train |
v1 | Schema:
schedules (alias: vmob)(value, id, salary, status)
staff(name, status, amount, type)
Task: Find salary from schedules where code appears in staff entries with matching level.
SQL: | SELECT salary FROM schedules AS vmob
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01159 | train |
v2 | Schema:
tasks (alias: znob)(level, type, salary, date)
orders(amount, code, date, name)
Task: Retrieve salary from tasks that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT salary FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01160 | train |
v2 | Schema:
employees (alias: bev)(id, status, value, name)
branches(salary, value, id, name)
Task: Retrieve code from employees that have at least one corresponding entry in branches sharing the same level.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01161 | train |
v2 | Schema:
tasks (alias: znob)(id, level, salary, status)
categories(name, id, code, level)
Task: Find name from tasks where a matching record exists in categories with the same level.
SQL: | SELECT name FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01162 | train |
v2 | Schema:
regions (alias: okiv)(level, amount, date, value)
sales(status, code, id, value)
Task: Find value from regions where a matching record exists in sales with the same id.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01163 | train |
v1 | Schema:
employees (alias: bev)(status, date, amount, name)
tasks(value, level, code, type)
Task: Find salary from employees where status appears in tasks entries with matching code.
SQL: | SELECT salary FROM employees AS bev
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01164 | train |
v1 | Schema:
categories (alias: egiv)(id, value, salary, amount)
employees(id, name, level, code)
Task: Select id from categories where type exists in employees for the same code.
SQL: | SELECT id FROM categories AS egiv
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01165 | train |
v1 | Schema:
customers (alias: lex)(status, amount, code, name)
employees(id, date, type, value)
Task: Retrieve salary from customers whose level is found in employees rows where level matches the outer record.
SQL: | SELECT salary FROM customers AS lex
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01166 | train |
v1 | Schema:
shipments (alias: vnob)(id, name, amount, status)
tasks(value, status, salary, amount)
Task: Find value from shipments where status appears in tasks entries with matching status.
SQL: | SELECT value FROM shipments AS vnob
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "tasks",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01167 | train |
v3 | Schema:
schedules (alias: vmob)(value, id, level, type)
branches(type, value, code, date)
Task: Retrieve id from schedules with salary above the MIN(value) of branches rows sharing the same code.
SQL: | SELECT id FROM schedules AS vmob
WHERE salary > (
SELECT MIN(value) FROM branches AS agov
WHERE agov.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01168 | train |
v2 | Schema:
invoices (alias: fal)(id, date, amount, value)
items(salary, code, value, level)
Task: Retrieve code from invoices that have at least one corresponding entry in items sharing the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01169 | train |
v1 | Schema:
accounts (alias: jac)(value, name, salary, date)
customers(name, type, value, status)
Task: Retrieve id from accounts whose level is found in customers rows where status matches the outer record.
SQL: | SELECT id FROM accounts AS jac
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01170 | train |
v3 | Schema:
invoices (alias: fal)(type, code, status, id)
shipments(status, date, type, name)
Task: Retrieve salary from invoices with value above the AVG(amount) of shipments rows sharing the same status.
SQL: | SELECT salary FROM invoices AS fal
WHERE value > (
SELECT AVG(amount) FROM shipments AS vnob
WHERE vnob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01171 | train |
v2 | Schema:
shipments (alias: vnob)(type, value, status, code)
invoices(date, status, id, name)
Task: Find salary from shipments where a matching record exists in invoices with the same code.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01172 | train |
v2 | Schema:
schedules (alias: vmob)(type, amount, id, code)
categories(salary, type, amount, name)
Task: Find salary from schedules where a matching record exists in categories with the same code.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01173 | train |
v3 | Schema:
invoices (alias: fal)(salary, amount, value, id)
schedules(salary, date, name, amount)
Task: Retrieve id from invoices with value above the AVG(value) of schedules rows sharing the same type.
SQL: | SELECT id FROM invoices AS fal
WHERE value > (
SELECT AVG(value) FROM schedules AS vmob
WHERE vmob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01174 | train |
v2 | Schema:
branches (alias: agov)(name, amount, status, type)
schedules(value, type, date, id)
Task: Retrieve name from branches that have at least one corresponding entry in schedules sharing the same status.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01175 | train |
v3 | Schema:
managers (alias: hac)(value, code, date, name)
branches(value, code, name, salary)
Task: Find value from managers where salary exceeds the average value from branches for the same type.
SQL: | SELECT value FROM managers AS hac
WHERE salary > (
SELECT AVG(value) FROM branches AS agov
WHERE agov.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01176 | train |
v3 | Schema:
categories (alias: egiv)(value, amount, type, code)
tasks(code, level, salary, date)
Task: Find name from categories where amount exceeds the average amount from tasks for the same type.
SQL: | SELECT name FROM categories AS egiv
WHERE amount > (
SELECT AVG(amount) FROM tasks AS znob
WHERE znob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01177 | train |
v3 | Schema:
transactions (alias: gev)(status, value, date, code)
categories(id, name, value, status)
Task: Find value from transactions where amount exceeds the total value from categories for the same level.
SQL: | SELECT value FROM transactions AS gev
WHERE amount > (
SELECT SUM(value) FROM categories AS egiv
WHERE egiv.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01178 | train |
v2 | Schema:
products (alias: nad)(level, amount, value, name)
accounts(name, status, id, value)
Task: Find name from products where a matching record exists in accounts with the same status.
SQL: | SELECT name FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = nad.status
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01179 | train |
v3 | Schema:
shipments (alias: vnob)(type, date, value, id)
items(amount, code, status, date)
Task: Find name from shipments where salary exceeds the average amount from items for the same status.
SQL: | SELECT name FROM shipments AS vnob
WHERE salary > (
SELECT AVG(amount) FROM items AS ikob
WHERE ikob.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "items",
"outer_alias": "vnob",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01180 | train |
v3 | Schema:
categories (alias: egiv)(status, name, value, date)
regions(date, name, status, salary)
Task: Find code from categories where salary exceeds the total amount from regions for the same code.
SQL: | SELECT code FROM categories AS egiv
WHERE salary > (
SELECT SUM(amount) FROM regions AS okiv
WHERE okiv.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01181 | train |
v2 | Schema:
customers (alias: lex)(id, salary, code, type)
managers(type, value, salary, id)
Task: Find value from customers where a matching record exists in managers with the same status.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01182 | train |
v2 | Schema:
departments (alias: dov)(value, code, id, salary)
branches(date, amount, name, salary)
Task: Find value from departments where a matching record exists in branches with the same type.
SQL: | SELECT value 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": "value",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01183 | train |
v2 | Schema:
employees (alias: bev)(value, name, date, id)
categories(id, amount, date, type)
Task: Find name from employees where a matching record exists in categories with the same status.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01184 | train |
v2 | Schema:
tasks (alias: znob)(amount, id, name, code)
staff(type, name, code, status)
Task: Retrieve amount from tasks that have at least one corresponding entry in staff sharing the same id.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01185 | train |
v1 | Schema:
branches (alias: agov)(code, status, date, type)
products(type, value, amount, level)
Task: Select code from branches where code exists in products for the same type.
SQL: | SELECT code FROM branches AS agov
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01186 | train |
v1 | Schema:
requests (alias: ejof)(salary, name, code, status)
orders(id, type, value, code)
Task: Select code from requests where id exists in orders for the same type.
SQL: | SELECT code FROM requests AS ejof
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01187 | train |
v3 | Schema:
accounts (alias: jac)(salary, date, name, value)
projects(type, amount, code, date)
Task: Retrieve amount from accounts with amount above the SUM(value) of projects rows sharing the same id.
SQL: | SELECT amount FROM accounts AS jac
WHERE amount > (
SELECT SUM(value) FROM projects AS uliv
WHERE uliv.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01188 | train |
v1 | Schema:
schedules (alias: vmob)(id, salary, value, status)
accounts(id, status, value, name)
Task: Retrieve name from schedules whose code is found in accounts rows where code matches the outer record.
SQL: | SELECT name FROM schedules AS vmob
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01189 | train |
v3 | Schema:
managers (alias: hac)(type, date, level, name)
projects(name, status, level, code)
Task: Retrieve id from managers with value above the MIN(salary) of projects rows sharing the same type.
SQL: | SELECT id FROM managers AS hac
WHERE value > (
SELECT MIN(salary) FROM projects AS uliv
WHERE uliv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01190 | train |
v2 | Schema:
shipments (alias: vnob)(amount, level, id, type)
accounts(value, status, type, amount)
Task: Find salary from shipments where a matching record exists in accounts with the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01191 | train |
v3 | Schema:
accounts (alias: jac)(level, date, status, name)
transactions(status, value, code, level)
Task: Find salary from accounts where salary exceeds the minimum value from transactions for the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE salary > (
SELECT MIN(value) FROM transactions AS gev
WHERE gev.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01192 | train |
v3 | Schema:
branches (alias: agov)(date, id, level, code)
categories(type, id, name, level)
Task: Retrieve name from branches with amount above the MIN(value) of categories rows sharing the same status.
SQL: | SELECT name FROM branches AS agov
WHERE amount > (
SELECT MIN(value) FROM categories AS egiv
WHERE egiv.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01193 | train |
v3 | Schema:
categories (alias: egiv)(date, salary, level, amount)
branches(code, salary, amount, date)
Task: Retrieve amount from categories with amount above the MAX(amount) of branches rows sharing the same id.
SQL: | SELECT amount FROM categories AS egiv
WHERE amount > (
SELECT MAX(amount) FROM branches AS agov
WHERE agov.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01194 | train |
v3 | Schema:
shipments (alias: vnob)(date, level, amount, code)
staff(name, code, salary, amount)
Task: Find amount from shipments where salary exceeds the average value from staff for the same status.
SQL: | SELECT amount FROM shipments AS vnob
WHERE salary > (
SELECT AVG(value) FROM staff AS xnob
WHERE xnob.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01195 | train |
v3 | Schema:
shipments (alias: vnob)(value, amount, salary, code)
sales(status, name, date, type)
Task: Find code from shipments where value exceeds the total value from sales for the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE value > (
SELECT SUM(value) FROM sales AS cif
WHERE cif.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01196 | train |
v2 | Schema:
branches (alias: agov)(date, status, id, type)
categories(code, amount, type, value)
Task: Retrieve amount from branches that have at least one corresponding entry in categories sharing the same id.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01197 | train |
v1 | Schema:
branches (alias: agov)(date, type, level, amount)
orders(name, amount, id, date)
Task: Select amount from branches where code exists in orders for the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01198 | train |
v1 | Schema:
transactions (alias: gev)(name, value, type, date)
regions(id, value, name, salary)
Task: Select value from transactions where type exists in regions for the same type.
SQL: | SELECT value FROM transactions AS gev
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01199 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.