variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v2 | Schema:
projects (alias: uliv)(salary, id, value, date)
shipments(date, type, name, salary)
Task: Retrieve name from projects that have at least one corresponding entry in shipments sharing the same type.
SQL: | SELECT name FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "shipments",
"outer_alias": "uliv",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03000 | train |
v3 | Schema:
branches (alias: agov)(name, salary, value, type)
customers(name, id, code, salary)
Task: Retrieve amount from branches with value above the MAX(value) of customers rows sharing the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE value > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03001 | train |
v2 | Schema:
orders (alias: kab)(value, status, salary, name)
invoices(value, type, id, status)
Task: Find id from orders where a matching record exists in invoices with the same code.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03002 | train |
v1 | Schema:
orders (alias: kab)(salary, status, name, value)
departments(date, name, type, value)
Task: Retrieve amount from orders whose id is found in departments rows where level matches the outer record.
SQL: | SELECT amount FROM orders AS kab
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03003 | train |
v1 | Schema:
orders (alias: kab)(name, level, salary, id)
requests(amount, status, value, level)
Task: Retrieve name from orders whose status is found in requests rows where code matches the outer record.
SQL: | SELECT name FROM orders AS kab
WHERE status IN (
SELECT status 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": "status",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03004 | train |
v1 | Schema:
staff (alias: xnob)(level, date, code, status)
categories(id, code, type, salary)
Task: Find salary from staff where id appears in categories entries with matching type.
SQL: | SELECT salary FROM staff AS xnob
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03005 | train |
v2 | Schema:
items (alias: ikob)(value, code, name, status)
products(code, id, salary, name)
Task: Retrieve id from items that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03006 | train |
v1 | Schema:
departments (alias: dov)(date, value, status, type)
regions(amount, name, value, id)
Task: Retrieve salary from departments whose status is found in regions rows where level matches the outer record.
SQL: | SELECT salary FROM departments AS dov
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03007 | train |
v2 | Schema:
items (alias: ikob)(id, code, salary, date)
accounts(level, date, name, status)
Task: Retrieve code from items that have at least one corresponding entry in accounts sharing the same code.
SQL: | SELECT code FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03008 | train |
v3 | Schema:
items (alias: ikob)(code, id, value, status)
customers(code, name, status, date)
Task: Retrieve value from items with salary above the MIN(amount) of customers rows sharing the same id.
SQL: | SELECT value FROM items AS ikob
WHERE salary > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03009 | train |
v2 | Schema:
categories (alias: egiv)(id, level, name, value)
staff(code, status, value, name)
Task: Find name from categories where a matching record exists in staff with the same code.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03010 | train |
v2 | Schema:
invoices (alias: fal)(date, value, status, name)
sales(id, name, salary, level)
Task: Find id from invoices where a matching record exists in sales with the same level.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03011 | train |
v2 | Schema:
branches (alias: agov)(id, code, amount, level)
schedules(value, name, type, level)
Task: Retrieve salary from branches that have at least one corresponding entry in schedules sharing the same code.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03012 | train |
v3 | Schema:
sales (alias: cif)(amount, id, value, date)
categories(value, salary, date, id)
Task: Find id from sales where salary exceeds the total amount from categories for the same type.
SQL: | SELECT id FROM sales AS cif
WHERE salary > (
SELECT SUM(amount) FROM categories AS egiv
WHERE egiv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03013 | train |
v1 | Schema:
tasks (alias: znob)(level, status, name, type)
managers(date, salary, value, status)
Task: Select salary from tasks where code exists in managers for the same id.
SQL: | SELECT salary FROM tasks AS znob
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03014 | train |
v1 | Schema:
projects (alias: uliv)(type, date, salary, amount)
schedules(value, id, salary, status)
Task: Select code from projects where type exists in schedules for the same status.
SQL: | SELECT code FROM projects AS uliv
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03015 | train |
v3 | Schema:
managers (alias: hac)(date, type, name, value)
items(code, id, amount, salary)
Task: Find salary from managers where value exceeds the count of value from items for the same type.
SQL: | SELECT salary FROM managers AS hac
WHERE value > (
SELECT COUNT(value) FROM items AS ikob
WHERE ikob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03016 | train |
v3 | Schema:
transactions (alias: gev)(type, value, status, date)
customers(date, status, code, id)
Task: Retrieve salary from transactions with salary above the AVG(value) of customers rows sharing the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE salary > (
SELECT AVG(value) FROM customers AS lex
WHERE lex.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03017 | train |
v2 | Schema:
employees (alias: bev)(status, id, date, salary)
projects(date, level, code, salary)
Task: Find salary from employees where a matching record exists in projects with the same status.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03018 | train |
v2 | Schema:
regions (alias: okiv)(salary, status, value, level)
departments(date, name, status, amount)
Task: Find salary from regions where a matching record exists in departments with the same type.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03019 | train |
v1 | Schema:
products (alias: nad)(date, value, status, salary)
regions(type, status, code, id)
Task: Find code from products where code appears in regions entries with matching type.
SQL: | SELECT code FROM products AS nad
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.type = nad.type
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03020 | train |
v3 | Schema:
transactions (alias: gev)(salary, name, id, code)
invoices(id, status, salary, level)
Task: Find amount from transactions where value exceeds the average salary from invoices for the same type.
SQL: | SELECT amount FROM transactions AS gev
WHERE value > (
SELECT AVG(salary) FROM invoices AS fal
WHERE fal.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "invoices",
"outer_alias": "gev",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03021 | train |
v2 | Schema:
regions (alias: okiv)(id, type, date, status)
orders(code, amount, date, type)
Task: Find id from regions where a matching record exists in orders with the same status.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03022 | train |
v2 | Schema:
requests (alias: ejof)(value, salary, date, amount)
departments(value, amount, code, status)
Task: Retrieve value from requests that have at least one corresponding entry in departments sharing the same status.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "departments",
"outer_alias": "ejof",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03023 | train |
v2 | Schema:
departments (alias: dov)(type, id, level, amount)
employees(type, amount, level, value)
Task: Retrieve salary from departments that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03024 | train |
v1 | Schema:
shipments (alias: vnob)(value, code, id, date)
requests(id, level, amount, status)
Task: Retrieve amount from shipments whose type is found in requests rows where status matches the outer record.
SQL: | SELECT amount FROM shipments AS vnob
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03025 | train |
v3 | Schema:
branches (alias: agov)(date, status, code, level)
orders(id, amount, name, code)
Task: Retrieve salary from branches with amount above the SUM(amount) of orders rows sharing the same code.
SQL: | SELECT salary FROM branches AS agov
WHERE amount > (
SELECT SUM(amount) FROM orders AS kab
WHERE kab.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03026 | train |
v3 | Schema:
schedules (alias: vmob)(level, salary, type, status)
departments(code, type, name, value)
Task: Find code from schedules where salary exceeds the count of salary from departments for the same id.
SQL: | SELECT code FROM schedules AS vmob
WHERE salary > (
SELECT COUNT(salary) FROM departments AS dov
WHERE dov.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03027 | train |
v1 | Schema:
schedules (alias: vmob)(type, salary, status, amount)
accounts(salary, date, id, amount)
Task: Find value from schedules where code appears in accounts entries with matching level.
SQL: | SELECT value FROM schedules AS vmob
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03028 | train |
v2 | Schema:
departments (alias: dov)(name, salary, amount, date)
projects(salary, code, amount, level)
Task: Find id from departments where a matching record exists in projects with the same type.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03029 | train |
v1 | Schema:
invoices (alias: fal)(amount, salary, id, name)
branches(code, id, status, type)
Task: Find salary from invoices where id appears in branches entries with matching code.
SQL: | SELECT salary FROM invoices AS fal
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03030 | train |
v3 | Schema:
customers (alias: lex)(type, code, level, name)
categories(level, id, status, amount)
Task: Retrieve value from customers with amount above the SUM(salary) of categories rows sharing the same level.
SQL: | SELECT value FROM customers AS lex
WHERE amount > (
SELECT SUM(salary) FROM categories AS egiv
WHERE egiv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "categories",
"outer_alias": "lex",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03031 | train |
v3 | Schema:
items (alias: ikob)(value, date, type, status)
products(name, status, date, salary)
Task: Find salary from items where amount exceeds the minimum value from products for the same level.
SQL: | SELECT salary FROM items AS ikob
WHERE amount > (
SELECT MIN(value) FROM products AS nad
WHERE nad.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03032 | train |
v3 | Schema:
orders (alias: kab)(status, code, date, level)
managers(code, type, salary, level)
Task: Retrieve amount from orders with value above the SUM(salary) of managers rows sharing the same code.
SQL: | SELECT amount FROM orders AS kab
WHERE value > (
SELECT SUM(salary) FROM managers AS hac
WHERE hac.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03033 | train |
v2 | Schema:
projects (alias: uliv)(level, code, value, date)
schedules(salary, code, level, status)
Task: Find value from projects where a matching record exists in schedules with the same type.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03034 | train |
v2 | Schema:
shipments (alias: vnob)(type, value, amount, date)
accounts(name, salary, id, code)
Task: Retrieve value from shipments that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT value FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03035 | train |
v3 | Schema:
accounts (alias: jac)(name, amount, type, code)
products(level, date, name, status)
Task: Find value from accounts where salary exceeds the count of value from products for the same type.
SQL: | SELECT value FROM accounts AS jac
WHERE salary > (
SELECT COUNT(value) FROM products AS nad
WHERE nad.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "products",
"outer_alias": "jac",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03036 | train |
v3 | Schema:
products (alias: nad)(level, type, amount, salary)
accounts(date, code, salary, value)
Task: Retrieve value from products with amount above the MIN(amount) of accounts rows sharing the same level.
SQL: | SELECT value FROM products AS nad
WHERE amount > (
SELECT MIN(amount) FROM accounts AS jac
WHERE jac.level = nad.level
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03037 | train |
v2 | Schema:
invoices (alias: fal)(code, level, name, type)
orders(salary, level, name, status)
Task: Retrieve value from invoices that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03038 | train |
v2 | Schema:
schedules (alias: vmob)(status, type, value, level)
branches(salary, code, amount, id)
Task: Find value from schedules where a matching record exists in branches with the same level.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03039 | train |
v2 | Schema:
regions (alias: okiv)(date, amount, salary, id)
orders(code, name, id, salary)
Task: Find salary from regions where a matching record exists in orders with the same status.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03040 | train |
v1 | Schema:
accounts (alias: jac)(type, status, code, level)
tasks(value, amount, type, date)
Task: Find value from accounts where level appears in tasks entries with matching id.
SQL: | SELECT value FROM accounts AS jac
WHERE level IN (
SELECT level 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": "level",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03041 | train |
v2 | Schema:
shipments (alias: vnob)(status, code, amount, name)
accounts(code, level, salary, amount)
Task: Find salary from shipments where a matching record exists in accounts with the same id.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03042 | train |
v3 | Schema:
regions (alias: okiv)(type, value, id, code)
staff(id, amount, salary, date)
Task: Retrieve value from regions with salary above the AVG(amount) of staff rows sharing the same type.
SQL: | SELECT value FROM regions AS okiv
WHERE salary > (
SELECT AVG(amount) FROM staff AS xnob
WHERE xnob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03043 | train |
v2 | Schema:
shipments (alias: vnob)(amount, salary, type, name)
categories(date, id, amount, name)
Task: Find name from shipments where a matching record exists in categories with the same code.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "categories",
"outer_alias": "vnob",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03044 | train |
v3 | Schema:
branches (alias: agov)(status, value, name, code)
orders(date, value, salary, type)
Task: Find value from branches where salary exceeds the average salary from orders for the same level.
SQL: | SELECT value FROM branches AS agov
WHERE salary > (
SELECT AVG(salary) FROM orders AS kab
WHERE kab.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03045 | train |
v3 | Schema:
transactions (alias: gev)(salary, status, type, value)
departments(status, name, amount, date)
Task: Find amount from transactions where salary exceeds the total salary from departments for the same id.
SQL: | SELECT amount FROM transactions AS gev
WHERE salary > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03046 | train |
v2 | Schema:
orders (alias: kab)(status, value, name, code)
branches(value, code, date, level)
Task: Retrieve id from orders that have at least one corresponding entry in branches sharing the same status.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03047 | train |
v3 | Schema:
regions (alias: okiv)(type, amount, name, level)
schedules(name, status, value, date)
Task: Retrieve id from regions with salary above the SUM(salary) of schedules rows sharing the same code.
SQL: | SELECT id FROM regions AS okiv
WHERE salary > (
SELECT SUM(salary) FROM schedules AS vmob
WHERE vmob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03048 | train |
v1 | Schema:
managers (alias: hac)(amount, status, type, code)
projects(date, salary, amount, value)
Task: Retrieve code from managers whose id is found in projects rows where type matches the outer record.
SQL: | SELECT code FROM managers AS hac
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03049 | train |
v1 | Schema:
schedules (alias: vmob)(id, type, value, amount)
regions(date, amount, salary, type)
Task: Select name from schedules where level exists in regions for the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "regions",
"outer_alias": "vmob",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03050 | train |
v1 | Schema:
accounts (alias: jac)(salary, status, amount, name)
managers(id, status, name, code)
Task: Retrieve value from accounts whose level is found in managers rows where level matches the outer record.
SQL: | SELECT value FROM accounts AS jac
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03051 | train |
v2 | Schema:
invoices (alias: fal)(name, salary, code, amount)
managers(level, value, code, salary)
Task: Find id from invoices where a matching record exists in managers with the same type.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03052 | train |
v2 | Schema:
branches (alias: agov)(name, salary, amount, value)
regions(date, name, code, salary)
Task: Find value from branches where a matching record exists in regions with the same level.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03053 | train |
v1 | Schema:
requests (alias: ejof)(date, status, amount, value)
regions(name, id, value, date)
Task: Select code from requests where status exists in regions for the same level.
SQL: | SELECT code FROM requests AS ejof
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_03054 | train |
v2 | Schema:
projects (alias: uliv)(type, level, status, amount)
accounts(level, name, type, amount)
Task: Retrieve code from projects that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT code FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "accounts",
"outer_alias": "uliv",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_03055 | train |
v3 | Schema:
departments (alias: dov)(type, id, name, date)
accounts(type, salary, date, id)
Task: Find amount from departments where salary exceeds the count of value from accounts for the same level.
SQL: | SELECT amount FROM departments AS dov
WHERE salary > (
SELECT COUNT(value) FROM accounts AS jac
WHERE jac.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "accounts",
"outer_alias": "dov",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03056 | train |
v3 | Schema:
orders (alias: kab)(date, code, level, name)
staff(salary, type, code, status)
Task: Find value from orders where salary exceeds the maximum amount from staff for the same type.
SQL: | SELECT value FROM orders AS kab
WHERE salary > (
SELECT MAX(amount) FROM staff AS xnob
WHERE xnob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03057 | train |
v2 | Schema:
shipments (alias: vnob)(type, name, amount, code)
regions(id, salary, status, amount)
Task: Retrieve value from shipments that have at least one corresponding entry in regions sharing the same status.
SQL: | SELECT value FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03058 | train |
v2 | Schema:
sales (alias: cif)(code, id, status, value)
projects(id, name, salary, date)
Task: Find id from sales where a matching record exists in projects with the same type.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03059 | train |
v1 | Schema:
employees (alias: bev)(name, value, level, id)
products(code, type, salary, value)
Task: Retrieve amount from employees whose code is found in products rows where code matches the outer record.
SQL: | SELECT amount FROM employees AS bev
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03060 | train |
v2 | Schema:
sales (alias: cif)(amount, code, level, value)
products(type, status, value, amount)
Task: Retrieve value from sales that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03061 | train |
v2 | Schema:
schedules (alias: vmob)(status, amount, code, salary)
accounts(value, date, id, type)
Task: Find value from schedules where a matching record exists in accounts with the same status.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03062 | train |
v3 | Schema:
shipments (alias: vnob)(date, name, code, value)
accounts(name, value, salary, level)
Task: Retrieve value from shipments with amount above the MAX(amount) of accounts rows sharing the same status.
SQL: | SELECT value FROM shipments AS vnob
WHERE amount > (
SELECT MAX(amount) FROM accounts AS jac
WHERE jac.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03063 | train |
v2 | Schema:
customers (alias: lex)(id, amount, code, date)
products(code, level, salary, date)
Task: Find salary from customers where a matching record exists in products with the same status.
SQL: | SELECT salary FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03064 | train |
v2 | Schema:
accounts (alias: jac)(value, salary, date, level)
items(date, id, name, code)
Task: Find name from accounts where a matching record exists in items with the same level.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03065 | train |
v2 | Schema:
transactions (alias: gev)(id, code, value, status)
regions(code, salary, id, amount)
Task: Find name from transactions where a matching record exists in regions with the same type.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03066 | train |
v1 | Schema:
accounts (alias: jac)(type, code, salary, level)
projects(status, amount, id, type)
Task: Select code from accounts where status exists in projects for the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03067 | train |
v2 | Schema:
employees (alias: bev)(status, id, amount, name)
categories(value, status, date, amount)
Task: Find code from employees where a matching record exists in categories with the same id.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03068 | train |
v3 | Schema:
transactions (alias: gev)(status, type, name, id)
categories(level, type, id, name)
Task: Retrieve value from transactions with amount above the MIN(value) of categories rows sharing the same level.
SQL: | SELECT value FROM transactions AS gev
WHERE amount > (
SELECT MIN(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": "MIN",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03069 | train |
v2 | Schema:
regions (alias: okiv)(status, amount, date, name)
categories(value, status, type, level)
Task: Find value from regions where a matching record exists in categories with the same level.
SQL: | SELECT value FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03070 | train |
v3 | Schema:
staff (alias: xnob)(salary, level, code, value)
products(type, salary, name, amount)
Task: Retrieve code from staff with value above the MAX(value) of products rows sharing the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE value > (
SELECT MAX(value) FROM products AS nad
WHERE nad.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "products",
"outer_alias": "xnob",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03071 | train |
v2 | Schema:
categories (alias: egiv)(type, salary, date, code)
orders(level, amount, salary, value)
Task: Retrieve id from categories that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03072 | train |
v1 | Schema:
transactions (alias: gev)(id, salary, type, name)
categories(name, id, salary, date)
Task: Retrieve value from transactions whose id is found in categories rows where type matches the outer record.
SQL: | SELECT value FROM transactions AS gev
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03073 | train |
v1 | Schema:
orders (alias: kab)(salary, amount, code, id)
branches(salary, type, level, code)
Task: Find name from orders where status appears in branches entries with matching id.
SQL: | SELECT name FROM orders AS kab
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03074 | train |
v3 | Schema:
regions (alias: okiv)(status, id, name, level)
schedules(status, name, id, date)
Task: Find id from regions where salary exceeds the total value from schedules for the same level.
SQL: | SELECT id FROM regions AS okiv
WHERE salary > (
SELECT SUM(value) FROM schedules AS vmob
WHERE vmob.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "schedules",
"outer_alias": "okiv",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03075 | train |
v3 | Schema:
shipments (alias: vnob)(code, salary, name, level)
accounts(type, amount, name, salary)
Task: Find name from shipments where value exceeds the maximum amount from accounts for the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE value > (
SELECT MAX(amount) FROM accounts AS jac
WHERE jac.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03076 | train |
v1 | Schema:
staff (alias: xnob)(type, id, salary, code)
products(level, value, code, type)
Task: Select code from staff where level exists in products for the same code.
SQL: | SELECT code FROM staff AS xnob
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "products",
"outer_alias": "xnob",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03077 | train |
v2 | Schema:
departments (alias: dov)(name, date, level, value)
orders(status, level, type, id)
Task: Find value from departments where a matching record exists in orders with the same level.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03078 | train |
v3 | Schema:
transactions (alias: gev)(code, level, status, amount)
sales(status, code, date, value)
Task: Find amount from transactions where value exceeds the total amount from sales for the same type.
SQL: | SELECT amount FROM transactions AS gev
WHERE value > (
SELECT SUM(amount) FROM sales AS cif
WHERE cif.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03079 | train |
v3 | Schema:
branches (alias: agov)(type, name, value, id)
staff(level, code, date, salary)
Task: Find value from branches where salary exceeds the total value from staff for the same code.
SQL: | SELECT value FROM branches AS agov
WHERE salary > (
SELECT SUM(value) FROM staff AS xnob
WHERE xnob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_03080 | train |
v1 | Schema:
tasks (alias: znob)(date, value, level, code)
requests(code, level, amount, type)
Task: Retrieve name from tasks whose status is found in requests rows where id matches the outer record.
SQL: | SELECT name FROM tasks AS znob
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03081 | train |
v2 | Schema:
items (alias: ikob)(value, date, id, code)
branches(amount, name, code, id)
Task: Find id from items where a matching record exists in branches with the same code.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_03082 | train |
v2 | Schema:
shipments (alias: vnob)(type, name, status, id)
accounts(status, value, code, id)
Task: Find name from shipments where a matching record exists in accounts with the same type.
SQL: | SELECT name 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": "name",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_03083 | train |
v2 | Schema:
schedules (alias: vmob)(date, value, name, id)
requests(id, salary, amount, code)
Task: Find salary from schedules where a matching record exists in requests with the same code.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_03084 | train |
v3 | Schema:
customers (alias: lex)(date, level, salary, code)
transactions(date, status, type, id)
Task: Retrieve salary from customers with amount above the AVG(salary) of transactions rows sharing the same type.
SQL: | SELECT salary FROM customers AS lex
WHERE amount > (
SELECT AVG(salary) FROM transactions AS gev
WHERE gev.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "transactions",
"outer_alias": "lex",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03085 | train |
v3 | Schema:
transactions (alias: gev)(date, status, name, value)
products(salary, name, type, date)
Task: Find id from transactions where value exceeds the maximum amount from products for the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT MAX(amount) FROM products AS nad
WHERE nad.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03086 | train |
v3 | Schema:
employees (alias: bev)(status, date, value, amount)
shipments(status, salary, type, code)
Task: Find name from employees where value exceeds the average amount from shipments for the same level.
SQL: | SELECT name FROM employees AS bev
WHERE value > (
SELECT AVG(amount) FROM shipments AS vnob
WHERE vnob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03087 | train |
v1 | Schema:
invoices (alias: fal)(status, amount, id, salary)
employees(status, code, type, amount)
Task: Find name from invoices where id appears in employees entries with matching id.
SQL: | SELECT name FROM invoices AS fal
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03088 | train |
v1 | Schema:
accounts (alias: jac)(date, name, status, code)
regions(code, status, type, value)
Task: Retrieve value from accounts whose code is found in regions rows where code matches the outer record.
SQL: | SELECT value FROM accounts AS jac
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03089 | train |
v3 | Schema:
categories (alias: egiv)(status, code, date, id)
invoices(code, level, amount, status)
Task: Find code from categories where value exceeds the average value from invoices for the same code.
SQL: | SELECT code FROM categories AS egiv
WHERE value > (
SELECT AVG(value) FROM invoices AS fal
WHERE fal.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03090 | train |
v1 | Schema:
orders (alias: kab)(level, salary, amount, status)
accounts(name, value, date, type)
Task: Select id from orders where id exists in accounts for the same level.
SQL: | SELECT id FROM orders AS kab
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03091 | train |
v3 | Schema:
regions (alias: okiv)(level, type, status, salary)
branches(level, value, id, amount)
Task: Retrieve salary from regions with amount above the MAX(amount) of branches rows sharing the same code.
SQL: | SELECT salary FROM regions AS okiv
WHERE amount > (
SELECT MAX(amount) FROM branches AS agov
WHERE agov.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_03092 | train |
v2 | Schema:
staff (alias: xnob)(id, date, type, salary)
sales(value, level, salary, id)
Task: Retrieve code from staff that have at least one corresponding entry in sales sharing the same type.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "sales",
"outer_alias": "xnob",
"inner_alias": "cif",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03093 | train |
v3 | Schema:
staff (alias: xnob)(value, salary, amount, date)
tasks(id, type, level, name)
Task: Find id from staff where salary exceeds the minimum value from tasks for the same type.
SQL: | SELECT id FROM staff AS xnob
WHERE salary > (
SELECT MIN(value) FROM tasks AS znob
WHERE znob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_03094 | train |
v1 | Schema:
categories (alias: egiv)(date, type, name, value)
employees(name, amount, id, level)
Task: Retrieve code from categories whose type is found in employees rows where code matches the outer record.
SQL: | SELECT code 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": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03095 | train |
v3 | Schema:
transactions (alias: gev)(code, type, name, level)
departments(level, code, id, status)
Task: Find id from transactions where salary exceeds the total salary from departments for the same level.
SQL: | SELECT id FROM transactions AS gev
WHERE salary > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03096 | train |
v1 | Schema:
tasks (alias: znob)(level, date, value, amount)
items(level, id, value, type)
Task: Find salary from tasks where status appears in items entries with matching id.
SQL: | SELECT salary FROM tasks AS znob
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_03097 | train |
v1 | Schema:
categories (alias: egiv)(type, level, date, value)
products(type, date, salary, code)
Task: Find id from categories where code appears in products entries with matching code.
SQL: | SELECT id FROM categories AS egiv
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_03098 | train |
v1 | Schema:
orders (alias: kab)(type, name, value, id)
invoices(code, level, status, date)
Task: Find id from orders where status appears in invoices entries with matching id.
SQL: | SELECT id FROM orders AS kab
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_03099 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.