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 |
|---|---|---|---|---|---|---|
v3 | Schema:
employees (alias: bev)(id, code, status, value)
staff(type, date, name, value)
Task: Retrieve id from employees with value above the SUM(salary) of staff rows sharing the same code.
SQL: | SELECT id FROM employees AS bev
WHERE value > (
SELECT SUM(salary) FROM staff AS xnob
WHERE xnob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04800 | train |
v3 | Schema:
accounts (alias: jac)(date, amount, id, code)
invoices(amount, code, value, salary)
Task: Retrieve value from accounts with value above the AVG(amount) of invoices rows sharing the same code.
SQL: | SELECT value FROM accounts AS jac
WHERE value > (
SELECT AVG(amount) FROM invoices AS fal
WHERE fal.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04801 | train |
v1 | Schema:
sales (alias: cif)(level, code, amount, status)
shipments(name, level, value, type)
Task: Select salary from sales where level exists in shipments for the same level.
SQL: | SELECT salary FROM sales AS cif
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04802 | train |
v2 | Schema:
managers (alias: hac)(salary, amount, value, level)
employees(salary, type, status, code)
Task: Find amount from managers where a matching record exists in employees with the same level.
SQL: | SELECT amount FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04803 | train |
v1 | Schema:
transactions (alias: gev)(type, value, status, id)
items(salary, id, status, value)
Task: Retrieve salary from transactions whose id is found in items rows where type matches the outer record.
SQL: | SELECT salary FROM transactions AS gev
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04804 | train |
v3 | Schema:
products (alias: nad)(code, level, amount, value)
staff(id, name, salary, type)
Task: Retrieve id from products with value above the SUM(salary) of staff rows sharing the same id.
SQL: | SELECT id FROM products AS nad
WHERE value > (
SELECT SUM(salary) FROM staff AS xnob
WHERE xnob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04805 | train |
v3 | Schema:
customers (alias: lex)(code, level, status, name)
projects(type, status, id, level)
Task: Retrieve value from customers with value above the MAX(value) of projects rows sharing the same status.
SQL: | SELECT value FROM customers AS lex
WHERE value > (
SELECT MAX(value) FROM projects AS uliv
WHERE uliv.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04806 | train |
v1 | Schema:
shipments (alias: vnob)(level, name, date, code)
products(code, status, name, amount)
Task: Select id from shipments where code exists in products for the same id.
SQL: | SELECT id FROM shipments AS vnob
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04807 | train |
v1 | Schema:
orders (alias: kab)(level, id, date, code)
departments(value, date, status, salary)
Task: Retrieve amount from orders whose status is found in departments rows where status matches the outer record.
SQL: | SELECT amount FROM orders AS kab
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04808 | train |
v1 | Schema:
projects (alias: uliv)(date, id, level, name)
managers(code, amount, status, value)
Task: Select code from projects where code exists in managers for the same code.
SQL: | SELECT code FROM projects AS uliv
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "managers",
"outer_alias": "uliv",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04809 | train |
v3 | Schema:
accounts (alias: jac)(date, level, type, value)
orders(amount, type, code, status)
Task: Retrieve id from accounts with amount above the MAX(salary) of orders rows sharing the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE amount > (
SELECT MAX(salary) FROM orders AS kab
WHERE kab.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04810 | train |
v3 | Schema:
sales (alias: cif)(code, date, amount, status)
schedules(salary, name, level, value)
Task: Find name from sales where salary exceeds the total salary from schedules for the same code.
SQL: | SELECT name FROM sales AS cif
WHERE salary > (
SELECT SUM(salary) FROM schedules AS vmob
WHERE vmob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04811 | train |
v3 | Schema:
schedules (alias: vmob)(value, type, date, name)
invoices(level, name, value, code)
Task: Retrieve id from schedules with salary above the AVG(amount) of invoices rows sharing the same level.
SQL: | SELECT id FROM schedules AS vmob
WHERE salary > (
SELECT AVG(amount) FROM invoices AS fal
WHERE fal.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "invoices",
"outer_alias": "vmob",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04812 | train |
v1 | Schema:
orders (alias: kab)(code, type, level, id)
requests(date, value, type, code)
Task: Retrieve name from orders whose id is found in requests rows where code matches the outer record.
SQL: | SELECT name FROM orders AS kab
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04813 | train |
v3 | Schema:
items (alias: ikob)(type, name, status, amount)
regions(status, value, amount, code)
Task: Find id from items where salary exceeds the minimum amount from regions for the same status.
SQL: | SELECT id FROM items AS ikob
WHERE salary > (
SELECT MIN(amount) FROM regions AS okiv
WHERE okiv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "ikob",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04814 | train |
v3 | Schema:
shipments (alias: vnob)(date, salary, name, id)
staff(type, salary, value, amount)
Task: Find name from shipments where salary exceeds the count of amount from staff for the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(amount) FROM staff AS xnob
WHERE xnob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04815 | train |
v3 | Schema:
schedules (alias: vmob)(salary, code, status, value)
managers(salary, value, name, amount)
Task: Find name from schedules where value exceeds the average salary from managers for the same type.
SQL: | SELECT name FROM schedules AS vmob
WHERE value > (
SELECT AVG(salary) FROM managers AS hac
WHERE hac.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04816 | train |
v2 | Schema:
requests (alias: ejof)(type, date, name, salary)
schedules(level, type, id, amount)
Task: Retrieve salary from requests that have at least one corresponding entry in schedules sharing the same status.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04817 | train |
v1 | Schema:
accounts (alias: jac)(level, code, name, type)
categories(status, name, id, value)
Task: Find value from accounts where level appears in categories entries with matching level.
SQL: | SELECT value FROM accounts AS jac
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04818 | train |
v2 | Schema:
sales (alias: cif)(status, salary, type, code)
branches(type, level, id, code)
Task: Find code from sales where a matching record exists in branches with the same type.
SQL: | SELECT code 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": "code",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04819 | train |
v2 | Schema:
items (alias: ikob)(date, type, id, status)
tasks(type, salary, value, level)
Task: Retrieve id from items that have at least one corresponding entry in tasks sharing the same code.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04820 | train |
v1 | Schema:
tasks (alias: znob)(amount, value, level, name)
schedules(value, amount, status, name)
Task: Retrieve amount from tasks whose type is found in schedules rows where code matches the outer record.
SQL: | SELECT amount FROM tasks AS znob
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04821 | train |
v3 | Schema:
employees (alias: bev)(amount, name, id, type)
categories(salary, name, value, date)
Task: Find salary from employees where salary exceeds the average value from categories for the same level.
SQL: | SELECT salary FROM employees AS bev
WHERE salary > (
SELECT AVG(value) FROM categories AS egiv
WHERE egiv.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04822 | train |
v2 | Schema:
categories (alias: egiv)(date, value, level, salary)
products(amount, date, value, level)
Task: Retrieve salary from categories that have at least one corresponding entry in products sharing the same id.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04823 | train |
v2 | Schema:
items (alias: ikob)(date, code, id, status)
employees(salary, value, date, name)
Task: Find amount from items where a matching record exists in employees with the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04824 | train |
v1 | Schema:
managers (alias: hac)(date, code, type, status)
categories(value, amount, name, status)
Task: Select amount from managers where code exists in categories for the same code.
SQL: | SELECT amount FROM managers AS hac
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "categories",
"outer_alias": "hac",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04825 | train |
v1 | Schema:
branches (alias: agov)(level, amount, value, id)
employees(code, amount, level, id)
Task: Retrieve salary from branches whose code is found in employees rows where type matches the outer record.
SQL: | SELECT salary FROM branches AS agov
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04826 | train |
v3 | Schema:
branches (alias: agov)(type, id, code, level)
shipments(value, code, status, name)
Task: Retrieve value from branches with salary above the MIN(salary) of shipments rows sharing the same code.
SQL: | SELECT value FROM branches AS agov
WHERE salary > (
SELECT MIN(salary) FROM shipments AS vnob
WHERE vnob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04827 | train |
v1 | Schema:
branches (alias: agov)(value, type, level, salary)
items(type, status, amount, name)
Task: Select salary from branches where id exists in items for the same code.
SQL: | SELECT salary FROM branches AS agov
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04828 | train |
v3 | Schema:
shipments (alias: vnob)(value, code, date, name)
branches(level, status, name, date)
Task: Find salary from shipments where value exceeds the minimum salary from branches for the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE value > (
SELECT MIN(salary) FROM branches AS agov
WHERE agov.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "branches",
"outer_alias": "vnob",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04829 | train |
v2 | Schema:
regions (alias: okiv)(salary, status, amount, code)
sales(code, date, value, salary)
Task: Find name from regions where a matching record exists in sales with the same id.
SQL: | SELECT name 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": "name",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04830 | train |
v3 | Schema:
managers (alias: hac)(id, type, name, date)
invoices(value, salary, name, date)
Task: Retrieve name from managers with amount above the SUM(value) of invoices rows sharing the same code.
SQL: | SELECT name FROM managers AS hac
WHERE amount > (
SELECT SUM(value) FROM invoices AS fal
WHERE fal.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04831 | train |
v1 | Schema:
schedules (alias: vmob)(status, level, date, value)
managers(amount, name, code, value)
Task: Retrieve value from schedules whose type is found in managers rows where status matches the outer record.
SQL: | SELECT value FROM schedules AS vmob
WHERE type IN (
SELECT type FROM managers AS hac
WHERE hac.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04832 | train |
v2 | Schema:
categories (alias: egiv)(value, status, level, id)
regions(date, salary, type, id)
Task: Find id from categories where a matching record exists in regions with the same code.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04833 | train |
v2 | Schema:
customers (alias: lex)(value, id, level, date)
transactions(salary, status, id, name)
Task: Find code from customers where a matching record exists in transactions with the same id.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "transactions",
"outer_alias": "lex",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04834 | train |
v3 | Schema:
sales (alias: cif)(type, status, salary, date)
requests(amount, salary, id, name)
Task: Find value from sales where salary exceeds the total salary from requests for the same level.
SQL: | SELECT value FROM sales AS cif
WHERE salary > (
SELECT SUM(salary) FROM requests AS ejof
WHERE ejof.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04835 | train |
v2 | Schema:
items (alias: ikob)(level, date, code, name)
managers(salary, status, name, date)
Task: Retrieve amount from items that have at least one corresponding entry in managers sharing the same type.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "managers",
"outer_alias": "ikob",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04836 | train |
v2 | Schema:
tasks (alias: znob)(value, code, id, name)
orders(code, status, amount, name)
Task: Retrieve value from tasks that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT value 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": "value",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04837 | train |
v3 | Schema:
employees (alias: bev)(status, level, code, date)
orders(level, status, amount, salary)
Task: Retrieve value from employees with salary above the MIN(amount) of orders rows sharing the same status.
SQL: | SELECT value FROM employees AS bev
WHERE salary > (
SELECT MIN(amount) FROM orders AS kab
WHERE kab.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04838 | train |
v3 | Schema:
customers (alias: lex)(amount, code, status, name)
shipments(status, id, name, type)
Task: Retrieve name from customers with salary above the COUNT(value) of shipments rows sharing the same type.
SQL: | SELECT name FROM customers AS lex
WHERE salary > (
SELECT COUNT(value) FROM shipments AS vnob
WHERE vnob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "lex",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04839 | train |
v3 | Schema:
items (alias: ikob)(code, id, name, status)
schedules(date, value, status, level)
Task: Retrieve name from items with amount above the SUM(value) of schedules rows sharing the same level.
SQL: | SELECT name FROM items AS ikob
WHERE amount > (
SELECT SUM(value) FROM schedules AS vmob
WHERE vmob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04840 | train |
v1 | Schema:
schedules (alias: vmob)(status, id, name, value)
tasks(salary, value, type, code)
Task: Find id from schedules where code appears in tasks entries with matching id.
SQL: | SELECT id FROM schedules AS vmob
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "tasks",
"outer_alias": "vmob",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04841 | train |
v2 | Schema:
regions (alias: okiv)(value, date, name, salary)
products(name, salary, value, level)
Task: Retrieve value from regions that have at least one corresponding entry in products sharing the same status.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04842 | train |
v1 | Schema:
transactions (alias: gev)(id, amount, status, value)
requests(id, amount, code, name)
Task: Find value from transactions where level appears in requests entries with matching type.
SQL: | SELECT value FROM transactions AS gev
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04843 | train |
v3 | Schema:
managers (alias: hac)(code, id, name, amount)
projects(salary, value, type, name)
Task: Retrieve code from managers with salary above the AVG(salary) of projects rows sharing the same status.
SQL: | SELECT code FROM managers AS hac
WHERE salary > (
SELECT AVG(salary) FROM projects AS uliv
WHERE uliv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04844 | train |
v3 | Schema:
invoices (alias: fal)(code, amount, level, id)
staff(name, salary, code, amount)
Task: Find name from invoices where value exceeds the maximum value from staff for the same level.
SQL: | SELECT name FROM invoices AS fal
WHERE value > (
SELECT MAX(value) FROM staff AS xnob
WHERE xnob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04845 | train |
v3 | Schema:
customers (alias: lex)(date, type, salary, level)
accounts(value, code, id, amount)
Task: Retrieve amount from customers with amount above the SUM(amount) of accounts rows sharing the same level.
SQL: | SELECT amount FROM customers AS lex
WHERE amount > (
SELECT SUM(amount) FROM accounts AS jac
WHERE jac.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04846 | train |
v3 | Schema:
staff (alias: xnob)(status, salary, value, name)
schedules(salary, type, status, amount)
Task: Retrieve amount from staff with amount above the SUM(amount) of schedules rows sharing the same id.
SQL: | SELECT amount FROM staff AS xnob
WHERE amount > (
SELECT SUM(amount) FROM schedules AS vmob
WHERE vmob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04847 | train |
v1 | Schema:
staff (alias: xnob)(date, name, id, level)
managers(amount, status, value, salary)
Task: Select code from staff where code exists in managers for the same level.
SQL: | SELECT code FROM staff AS xnob
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04848 | train |
v2 | Schema:
managers (alias: hac)(value, code, status, id)
shipments(amount, type, level, code)
Task: Retrieve value from managers that have at least one corresponding entry in shipments sharing the same code.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04849 | train |
v2 | Schema:
products (alias: nad)(amount, salary, id, value)
items(amount, date, name, value)
Task: Find value from products where a matching record exists in items with the same status.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = nad.status
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04850 | train |
v3 | Schema:
accounts (alias: jac)(type, id, value, date)
employees(level, name, status, date)
Task: Retrieve code from accounts with value above the COUNT(salary) of employees rows sharing the same level.
SQL: | SELECT code FROM accounts AS jac
WHERE value > (
SELECT COUNT(salary) FROM employees AS bev
WHERE bev.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04851 | train |
v1 | Schema:
branches (alias: agov)(amount, date, value, type)
staff(value, amount, id, status)
Task: Find code from branches where level appears in staff entries with matching id.
SQL: | SELECT code FROM branches AS agov
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04852 | train |
v3 | Schema:
tasks (alias: znob)(status, amount, id, level)
orders(status, type, date, level)
Task: Find code from tasks where amount exceeds the average value from orders for the same level.
SQL: | SELECT code FROM tasks AS znob
WHERE amount > (
SELECT AVG(value) FROM orders AS kab
WHERE kab.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04853 | train |
v2 | Schema:
managers (alias: hac)(code, name, date, amount)
invoices(date, code, type, salary)
Task: Retrieve amount from managers that have at least one corresponding entry in invoices sharing the same code.
SQL: | SELECT amount FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04854 | train |
v3 | Schema:
customers (alias: lex)(date, amount, level, name)
products(amount, code, salary, date)
Task: Find id from customers where value exceeds the maximum amount from products for the same id.
SQL: | SELECT id FROM customers AS lex
WHERE value > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04855 | train |
v2 | Schema:
tasks (alias: znob)(name, date, level, type)
sales(value, type, level, amount)
Task: Retrieve code from tasks that have at least one corresponding entry in sales sharing the same status.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04856 | train |
v1 | Schema:
categories (alias: egiv)(value, type, id, name)
products(value, level, status, type)
Task: Retrieve amount from categories whose id is found in products rows where id matches the outer record.
SQL: | SELECT amount FROM categories AS egiv
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04857 | train |
v1 | Schema:
categories (alias: egiv)(code, id, level, date)
projects(level, type, amount, name)
Task: Retrieve code from categories whose type is found in projects rows where level matches the outer record.
SQL: | SELECT code FROM categories AS egiv
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04858 | train |
v2 | Schema:
orders (alias: kab)(id, amount, code, type)
requests(code, name, value, level)
Task: Retrieve name from orders that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04859 | train |
v3 | Schema:
categories (alias: egiv)(level, id, amount, code)
branches(date, code, level, amount)
Task: Find amount from categories where salary exceeds the count of value from branches for the same code.
SQL: | SELECT amount FROM categories AS egiv
WHERE salary > (
SELECT COUNT(value) FROM branches AS agov
WHERE agov.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04860 | train |
v2 | Schema:
sales (alias: cif)(level, code, date, status)
orders(code, name, value, type)
Task: Retrieve salary from sales that have at least one corresponding entry in orders sharing the same status.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "orders",
"outer_alias": "cif",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04861 | train |
v2 | Schema:
transactions (alias: gev)(date, status, amount, value)
projects(salary, id, type, value)
Task: Find value from transactions where a matching record exists in projects with the same type.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04862 | train |
v3 | Schema:
items (alias: ikob)(name, type, code, salary)
requests(id, date, level, amount)
Task: Find value from items where amount exceeds the count of salary from requests for the same code.
SQL: | SELECT value FROM items AS ikob
WHERE amount > (
SELECT COUNT(salary) FROM requests AS ejof
WHERE ejof.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04863 | train |
v2 | Schema:
employees (alias: bev)(amount, value, code, salary)
regions(value, type, id, level)
Task: Retrieve id from employees that have at least one corresponding entry in regions sharing the same level.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04864 | train |
v1 | Schema:
shipments (alias: vnob)(level, value, name, status)
regions(status, value, type, name)
Task: Retrieve salary from shipments whose type is found in regions rows where level matches the outer record.
SQL: | SELECT salary FROM shipments AS vnob
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04865 | train |
v2 | Schema:
sales (alias: cif)(name, value, id, type)
shipments(value, salary, code, level)
Task: Retrieve id from sales that have at least one corresponding entry in shipments sharing the same type.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04866 | train |
v3 | Schema:
customers (alias: lex)(id, level, value, salary)
accounts(amount, level, salary, status)
Task: Retrieve amount from customers with amount above the COUNT(amount) of accounts rows sharing the same type.
SQL: | SELECT amount FROM customers AS lex
WHERE amount > (
SELECT COUNT(amount) FROM accounts AS jac
WHERE jac.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04867 | train |
v3 | Schema:
categories (alias: egiv)(name, id, amount, value)
tasks(code, name, date, status)
Task: Find salary from categories where value exceeds the maximum amount from tasks for the same code.
SQL: | SELECT salary FROM categories AS egiv
WHERE value > (
SELECT MAX(amount) FROM tasks AS znob
WHERE znob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04868 | train |
v3 | Schema:
sales (alias: cif)(name, level, id, salary)
categories(value, salary, type, amount)
Task: Retrieve salary from sales with value above the AVG(value) of categories rows sharing the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE value > (
SELECT AVG(value) FROM categories AS egiv
WHERE egiv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04869 | train |
v2 | Schema:
regions (alias: okiv)(name, date, id, type)
departments(name, code, salary, id)
Task: Find code from regions where a matching record exists in departments with the same level.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04870 | train |
v1 | Schema:
sales (alias: cif)(status, amount, name, date)
departments(id, date, amount, status)
Task: Find value from sales where code appears in departments entries with matching id.
SQL: | SELECT value FROM sales AS cif
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "cif",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04871 | train |
v2 | Schema:
departments (alias: dov)(value, id, level, name)
products(level, date, name, status)
Task: Find amount from departments where a matching record exists in products with the same id.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04872 | train |
v1 | Schema:
projects (alias: uliv)(name, type, date, code)
accounts(status, level, date, salary)
Task: Select salary from projects where status exists in accounts for the same type.
SQL: | SELECT salary FROM projects AS uliv
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "accounts",
"outer_alias": "uliv",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04873 | train |
v3 | Schema:
categories (alias: egiv)(status, id, value, date)
shipments(code, level, type, amount)
Task: Find salary from categories where value exceeds the total salary from shipments for the same status.
SQL: | SELECT salary FROM categories AS egiv
WHERE value > (
SELECT SUM(salary) FROM shipments AS vnob
WHERE vnob.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "shipments",
"outer_alias": "egiv",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04874 | train |
v3 | Schema:
accounts (alias: jac)(id, name, salary, date)
schedules(salary, amount, type, value)
Task: Find salary from accounts where amount exceeds the total amount from schedules for the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE amount > (
SELECT SUM(amount) FROM schedules AS vmob
WHERE vmob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04875 | train |
v2 | Schema:
requests (alias: ejof)(code, type, date, amount)
regions(name, id, value, code)
Task: Retrieve name from requests that have at least one corresponding entry in regions sharing the same code.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04876 | train |
v1 | Schema:
requests (alias: ejof)(type, date, id, level)
staff(type, level, status, id)
Task: Retrieve salary from requests whose status is found in staff rows where level matches the outer record.
SQL: | SELECT salary FROM requests AS ejof
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04877 | train |
v3 | Schema:
tasks (alias: znob)(name, id, level, status)
transactions(level, name, amount, value)
Task: Retrieve value from tasks with amount above the COUNT(value) of transactions rows sharing the same code.
SQL: | SELECT value FROM tasks AS znob
WHERE amount > (
SELECT COUNT(value) FROM transactions AS gev
WHERE gev.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04878 | train |
v2 | Schema:
managers (alias: hac)(status, amount, date, id)
transactions(level, date, amount, id)
Task: Retrieve id from managers that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04879 | train |
v1 | Schema:
transactions (alias: gev)(code, level, status, date)
projects(salary, amount, id, type)
Task: Find value from transactions where status appears in projects entries with matching id.
SQL: | SELECT value FROM transactions AS gev
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04880 | train |
v1 | Schema:
customers (alias: lex)(salary, status, type, id)
staff(value, date, name, status)
Task: Select amount from customers where status exists in staff for the same code.
SQL: | SELECT amount FROM customers AS lex
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04881 | train |
v2 | Schema:
departments (alias: dov)(status, salary, level, type)
categories(date, status, value, level)
Task: Retrieve name from departments that have at least one corresponding entry in categories sharing the same status.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04882 | train |
v1 | Schema:
requests (alias: ejof)(name, type, id, salary)
orders(type, code, amount, name)
Task: Retrieve id from requests whose code is found in orders rows where status matches the outer record.
SQL: | SELECT id FROM requests AS ejof
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04883 | train |
v2 | Schema:
sales (alias: cif)(level, type, code, amount)
regions(code, value, name, salary)
Task: Retrieve value from sales that have at least one corresponding entry in regions sharing the same level.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04884 | train |
v1 | Schema:
categories (alias: egiv)(type, status, id, value)
staff(id, code, level, status)
Task: Find value from categories where status appears in staff entries with matching level.
SQL: | SELECT value FROM categories AS egiv
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04885 | train |
v3 | Schema:
staff (alias: xnob)(id, value, code, status)
products(level, status, name, amount)
Task: Find salary from staff where amount exceeds the average value from products for the same type.
SQL: | SELECT salary FROM staff AS xnob
WHERE amount > (
SELECT AVG(value) FROM products AS nad
WHERE nad.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "products",
"outer_alias": "xnob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04886 | train |
v1 | Schema:
regions (alias: okiv)(id, salary, date, value)
employees(value, amount, level, status)
Task: Select amount from regions where code exists in employees for the same level.
SQL: | SELECT amount FROM regions AS okiv
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04887 | train |
v2 | Schema:
accounts (alias: jac)(name, id, salary, date)
items(status, code, salary, amount)
Task: Find salary from accounts where a matching record exists in items with the same code.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04888 | train |
v2 | Schema:
customers (alias: lex)(type, level, code, amount)
accounts(status, id, name, code)
Task: Retrieve amount from customers that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04889 | train |
v2 | Schema:
staff (alias: xnob)(type, salary, status, code)
transactions(status, date, id, code)
Task: Find salary from staff where a matching record exists in transactions with the same id.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "xnob",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04890 | train |
v1 | Schema:
categories (alias: egiv)(id, amount, name, date)
invoices(level, salary, name, amount)
Task: Select code from categories where level exists in invoices for the same status.
SQL: | SELECT code FROM categories AS egiv
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04891 | train |
v3 | Schema:
invoices (alias: fal)(id, value, level, salary)
orders(amount, name, date, type)
Task: Retrieve amount from invoices with amount above the COUNT(salary) of orders rows sharing the same code.
SQL: | SELECT amount FROM invoices AS fal
WHERE amount > (
SELECT COUNT(salary) FROM orders AS kab
WHERE kab.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04892 | train |
v3 | Schema:
sales (alias: cif)(date, type, name, status)
products(date, salary, status, level)
Task: Retrieve amount from sales with value above the MAX(salary) of products rows sharing the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE value > (
SELECT MAX(salary) FROM products AS nad
WHERE nad.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04893 | train |
v1 | Schema:
managers (alias: hac)(code, amount, value, type)
staff(amount, status, date, code)
Task: Retrieve name from managers whose level is found in staff rows where status matches the outer record.
SQL: | SELECT name FROM managers AS hac
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04894 | train |
v2 | Schema:
customers (alias: lex)(salary, amount, level, type)
products(id, name, code, date)
Task: Find amount from customers where a matching record exists in products with the same type.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04895 | train |
v3 | Schema:
requests (alias: ejof)(id, name, type, date)
sales(level, id, status, salary)
Task: Find value from requests where salary exceeds the count of salary from sales for the same status.
SQL: | SELECT value FROM requests AS ejof
WHERE salary > (
SELECT COUNT(salary) FROM sales AS cif
WHERE cif.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04896 | train |
v3 | Schema:
requests (alias: ejof)(salary, value, date, level)
orders(id, value, status, salary)
Task: Find salary from requests where amount exceeds the maximum value from orders for the same type.
SQL: | SELECT salary FROM requests AS ejof
WHERE amount > (
SELECT MAX(value) FROM orders AS kab
WHERE kab.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04897 | train |
v3 | Schema:
managers (alias: hac)(date, amount, id, level)
requests(salary, date, id, level)
Task: Retrieve value from managers with salary above the COUNT(amount) of requests rows sharing the same level.
SQL: | SELECT value FROM managers AS hac
WHERE salary > (
SELECT COUNT(amount) FROM requests AS ejof
WHERE ejof.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "hac",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04898 | train |
v2 | Schema:
schedules (alias: vmob)(id, name, date, salary)
projects(status, level, salary, id)
Task: Find value from schedules where a matching record exists in projects with the same id.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "projects",
"outer_alias": "vmob",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04899 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.