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)(type, amount, value, status)
branches(date, salary, amount, id)
Task: Retrieve salary from projects that have at least one corresponding entry in branches sharing the same type.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09700 | train |
v3 | Schema:
sales (alias: cif)(type, code, date, name)
projects(salary, id, status, value)
Task: Find value from sales where value exceeds the count of value from projects for the same status.
SQL: | SELECT value FROM sales AS cif
WHERE value > (
SELECT COUNT(value) FROM projects AS uliv
WHERE uliv.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09701 | train |
v3 | Schema:
projects (alias: uliv)(status, salary, code, type)
staff(date, level, status, value)
Task: Find salary from projects where value exceeds the maximum value from staff for the same type.
SQL: | SELECT salary FROM projects AS uliv
WHERE value > (
SELECT MAX(value) FROM staff AS xnob
WHERE xnob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09702 | train |
v3 | Schema:
employees (alias: bev)(code, value, type, status)
orders(value, salary, code, name)
Task: Find code from employees where amount exceeds the minimum salary from orders for the same status.
SQL: | SELECT code FROM employees AS bev
WHERE amount > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09703 | train |
v2 | Schema:
categories (alias: egiv)(value, level, name, id)
regions(salary, code, value, name)
Task: Find id from categories where a matching record exists in regions with the same type.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09704 | train |
v2 | Schema:
schedules (alias: vmob)(level, status, code, name)
products(date, value, id, code)
Task: Find id from schedules where a matching record exists in products with the same type.
SQL: | SELECT id FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09705 | train |
v3 | Schema:
sales (alias: cif)(name, code, date, amount)
staff(status, salary, id, value)
Task: Find id from sales where value exceeds the average salary from staff for the same level.
SQL: | SELECT id FROM sales AS cif
WHERE value > (
SELECT AVG(salary) FROM staff AS xnob
WHERE xnob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09706 | train |
v2 | Schema:
schedules (alias: vmob)(type, value, date, id)
staff(type, code, salary, amount)
Task: Find id from schedules where a matching record exists in staff with the same code.
SQL: | SELECT id FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09707 | train |
v3 | Schema:
orders (alias: kab)(amount, code, level, name)
schedules(type, level, amount, id)
Task: Retrieve amount from orders with value above the AVG(value) of schedules rows sharing the same id.
SQL: | SELECT amount FROM orders AS kab
WHERE value > (
SELECT AVG(value) FROM schedules AS vmob
WHERE vmob.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09708 | train |
v2 | Schema:
orders (alias: kab)(level, amount, type, name)
requests(status, salary, amount, id)
Task: Retrieve name from orders that have at least one corresponding entry in requests sharing the same code.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09709 | train |
v2 | Schema:
requests (alias: ejof)(name, status, code, type)
staff(id, level, code, value)
Task: Retrieve salary from requests that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09710 | train |
v2 | Schema:
tasks (alias: znob)(code, type, value, salary)
items(date, id, level, salary)
Task: Find code from tasks where a matching record exists in items with the same status.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09711 | train |
v3 | Schema:
categories (alias: egiv)(type, level, date, id)
tasks(level, type, amount, code)
Task: Retrieve id from categories with value above the SUM(salary) of tasks rows sharing the same status.
SQL: | SELECT id FROM categories AS egiv
WHERE value > (
SELECT SUM(salary) FROM tasks AS znob
WHERE znob.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "id",
"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_09712 | train |
v1 | Schema:
requests (alias: ejof)(id, salary, type, status)
employees(level, date, type, id)
Task: Select code from requests where level exists in employees for the same level.
SQL: | SELECT code FROM requests AS ejof
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09713 | train |
v3 | Schema:
items (alias: ikob)(level, code, name, amount)
shipments(status, amount, id, date)
Task: Retrieve name from items with value above the MIN(amount) of shipments rows sharing the same code.
SQL: | SELECT name FROM items AS ikob
WHERE value > (
SELECT MIN(amount) FROM shipments AS vnob
WHERE vnob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09714 | train |
v2 | Schema:
products (alias: nad)(amount, id, date, status)
departments(name, status, date, amount)
Task: Find salary from products where a matching record exists in departments with the same status.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = nad.status
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09715 | train |
v3 | Schema:
employees (alias: bev)(level, code, value, id)
departments(id, date, code, type)
Task: Find name from employees where value exceeds the average salary from departments for the same id.
SQL: | SELECT name FROM employees AS bev
WHERE value > (
SELECT AVG(salary) FROM departments AS dov
WHERE dov.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09716 | train |
v3 | Schema:
projects (alias: uliv)(id, salary, status, value)
branches(status, code, value, salary)
Task: Retrieve amount from projects with amount above the COUNT(amount) of branches rows sharing the same id.
SQL: | SELECT amount FROM projects AS uliv
WHERE amount > (
SELECT COUNT(amount) FROM branches AS agov
WHERE agov.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09717 | train |
v1 | Schema:
categories (alias: egiv)(amount, salary, name, type)
invoices(amount, id, code, name)
Task: Retrieve id from categories whose id is found in invoices rows where type matches the outer record.
SQL: | SELECT id FROM categories AS egiv
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09718 | train |
v1 | Schema:
regions (alias: okiv)(status, salary, code, type)
customers(amount, status, type, date)
Task: Retrieve amount from regions whose code is found in customers rows where id matches the outer record.
SQL: | SELECT amount FROM regions AS okiv
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09719 | train |
v1 | Schema:
customers (alias: lex)(level, salary, value, type)
accounts(status, salary, date, type)
Task: Select value from customers where id exists in accounts for the same code.
SQL: | SELECT value FROM customers AS lex
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09720 | train |
v3 | Schema:
invoices (alias: fal)(salary, status, level, value)
departments(salary, amount, value, name)
Task: Retrieve value from invoices with salary above the COUNT(value) of departments rows sharing the same type.
SQL: | SELECT value FROM invoices AS fal
WHERE salary > (
SELECT COUNT(value) FROM departments AS dov
WHERE dov.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "departments",
"outer_alias": "fal",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09721 | train |
v2 | Schema:
schedules (alias: vmob)(name, value, id, type)
projects(name, level, type, salary)
Task: Find id from schedules where a matching record exists in projects with the same id.
SQL: | SELECT id 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": "id",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09722 | train |
v1 | Schema:
departments (alias: dov)(id, name, type, salary)
orders(id, salary, value, type)
Task: Retrieve name from departments whose level is found in orders rows where level matches the outer record.
SQL: | SELECT name FROM departments AS dov
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09723 | train |
v1 | Schema:
items (alias: ikob)(type, id, date, value)
branches(name, code, level, value)
Task: Select code from items where type exists in branches for the same level.
SQL: | SELECT code FROM items AS ikob
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09724 | train |
v2 | Schema:
regions (alias: okiv)(id, salary, value, amount)
managers(salary, id, name, value)
Task: Retrieve code from regions that have at least one corresponding entry in managers sharing the same code.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09725 | train |
v3 | Schema:
tasks (alias: znob)(status, value, level, amount)
schedules(status, level, amount, value)
Task: Find id from tasks where value exceeds the minimum salary from schedules for the same code.
SQL: | SELECT id FROM tasks AS znob
WHERE value > (
SELECT MIN(salary) FROM schedules AS vmob
WHERE vmob.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "schedules",
"outer_alias": "znob",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09726 | train |
v3 | Schema:
shipments (alias: vnob)(level, salary, date, status)
employees(amount, date, salary, code)
Task: Retrieve salary from shipments with value above the SUM(salary) of employees rows sharing the same code.
SQL: | SELECT salary FROM shipments AS vnob
WHERE value > (
SELECT SUM(salary) FROM employees AS bev
WHERE bev.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09727 | train |
v1 | Schema:
sales (alias: cif)(salary, level, status, value)
items(salary, type, code, name)
Task: Retrieve amount from sales whose id is found in items rows where id matches the outer record.
SQL: | SELECT amount FROM sales AS cif
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09728 | train |
v2 | Schema:
employees (alias: bev)(code, level, name, type)
invoices(code, salary, name, value)
Task: Retrieve amount from employees that have at least one corresponding entry in invoices sharing the same id.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "invoices",
"outer_alias": "bev",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09729 | train |
v3 | Schema:
regions (alias: okiv)(code, amount, name, value)
customers(amount, value, date, code)
Task: Find id from regions where salary exceeds the average value from customers for the same type.
SQL: | SELECT id FROM regions AS okiv
WHERE salary > (
SELECT AVG(value) FROM customers AS lex
WHERE lex.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09730 | train |
v2 | Schema:
projects (alias: uliv)(level, date, code, type)
managers(amount, level, type, value)
Task: Find id from projects where a matching record exists in managers with the same status.
SQL: | SELECT id FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "managers",
"outer_alias": "uliv",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09731 | train |
v2 | Schema:
items (alias: ikob)(level, type, name, date)
orders(code, value, date, status)
Task: Find salary from items where a matching record exists in orders with the same type.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09732 | train |
v1 | Schema:
accounts (alias: jac)(status, code, amount, value)
departments(value, level, code, date)
Task: Find value from accounts where type appears in departments entries with matching level.
SQL: | SELECT value FROM accounts AS jac
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09733 | train |
v2 | Schema:
transactions (alias: gev)(level, id, date, code)
schedules(id, type, code, level)
Task: Retrieve value from transactions that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09734 | train |
v2 | Schema:
regions (alias: okiv)(code, value, salary, id)
categories(salary, date, status, id)
Task: Retrieve id from regions that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09735 | train |
v1 | Schema:
employees (alias: bev)(id, name, code, level)
branches(amount, id, name, status)
Task: Select amount from employees where level exists in branches for the same type.
SQL: | SELECT amount FROM employees AS bev
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09736 | train |
v3 | Schema:
employees (alias: bev)(date, salary, id, value)
departments(salary, status, id, type)
Task: Find id from employees where salary exceeds the total value from departments for the same id.
SQL: | SELECT id FROM employees AS bev
WHERE salary > (
SELECT SUM(value) FROM departments AS dov
WHERE dov.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09737 | train |
v2 | Schema:
products (alias: nad)(date, value, name, level)
requests(type, level, id, code)
Task: Find amount from products where a matching record exists in requests with the same level.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = nad.level
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09738 | train |
v2 | Schema:
invoices (alias: fal)(id, date, salary, value)
managers(amount, level, date, name)
Task: Find id from invoices where a matching record exists in managers with the same code.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09739 | train |
v1 | Schema:
transactions (alias: gev)(date, value, code, salary)
products(name, value, code, salary)
Task: Retrieve code from transactions whose status is found in products rows where id matches the outer record.
SQL: | SELECT code FROM transactions AS gev
WHERE status IN (
SELECT status FROM products AS nad
WHERE nad.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09740 | train |
v1 | Schema:
managers (alias: hac)(salary, name, status, date)
tasks(id, type, level, code)
Task: Find value from managers where status appears in tasks entries with matching id.
SQL: | SELECT value FROM managers AS hac
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09741 | train |
v2 | Schema:
customers (alias: lex)(date, type, code, salary)
schedules(amount, salary, status, type)
Task: Retrieve value from customers that have at least one corresponding entry in schedules sharing the same code.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09742 | train |
v1 | Schema:
orders (alias: kab)(date, amount, type, value)
accounts(type, level, code, name)
Task: Retrieve amount from orders whose code is found in accounts rows where code matches the outer record.
SQL: | SELECT amount FROM orders AS kab
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09743 | train |
v3 | Schema:
sales (alias: cif)(status, type, level, code)
products(salary, type, date, level)
Task: Find id from sales where value exceeds the average salary from products for the same level.
SQL: | SELECT id FROM sales AS cif
WHERE value > (
SELECT AVG(salary) FROM products AS nad
WHERE nad.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09744 | train |
v2 | Schema:
customers (alias: lex)(salary, level, id, amount)
departments(type, code, date, name)
Task: Retrieve code from customers that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "departments",
"outer_alias": "lex",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09745 | train |
v3 | Schema:
regions (alias: okiv)(code, type, status, id)
products(code, level, salary, type)
Task: Find code from regions where amount exceeds the count of salary from products for the same id.
SQL: | SELECT code FROM regions AS okiv
WHERE amount > (
SELECT COUNT(salary) FROM products AS nad
WHERE nad.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_09746 | train |
v2 | Schema:
invoices (alias: fal)(level, type, name, value)
schedules(salary, level, type, value)
Task: Retrieve value from invoices that have at least one corresponding entry in schedules sharing the same level.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09747 | train |
v1 | Schema:
tasks (alias: znob)(date, status, amount, type)
sales(salary, type, date, level)
Task: Retrieve id from tasks whose type is found in sales rows where id matches the outer record.
SQL: | SELECT id FROM tasks AS znob
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09748 | train |
v1 | Schema:
departments (alias: dov)(id, amount, value, code)
invoices(name, salary, level, code)
Task: Find amount from departments where type appears in invoices entries with matching status.
SQL: | SELECT amount FROM departments AS dov
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09749 | train |
v1 | Schema:
customers (alias: lex)(code, name, date, id)
products(salary, date, value, type)
Task: Retrieve code from customers whose id is found in products rows where code matches the outer record.
SQL: | SELECT code FROM customers AS lex
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09750 | train |
v3 | Schema:
schedules (alias: vmob)(id, salary, date, value)
employees(status, date, salary, name)
Task: Find id from schedules where salary exceeds the maximum value from employees for the same type.
SQL: | SELECT id FROM schedules AS vmob
WHERE salary > (
SELECT MAX(value) FROM employees AS bev
WHERE bev.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "employees",
"outer_alias": "vmob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_09751 | train |
v3 | Schema:
transactions (alias: gev)(id, amount, salary, value)
projects(date, salary, id, name)
Task: Find code from transactions where value exceeds the minimum amount from projects for the same level.
SQL: | SELECT code FROM transactions AS gev
WHERE value > (
SELECT MIN(amount) FROM projects AS uliv
WHERE uliv.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09752 | train |
v3 | Schema:
staff (alias: xnob)(salary, status, level, value)
employees(date, id, code, type)
Task: Retrieve id from staff with value above the COUNT(salary) of employees rows sharing the same type.
SQL: | SELECT id FROM staff AS xnob
WHERE value > (
SELECT COUNT(salary) FROM employees AS bev
WHERE bev.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09753 | train |
v3 | Schema:
items (alias: ikob)(status, level, name, amount)
orders(level, status, id, date)
Task: Find value from items where value exceeds the count of amount from orders for the same type.
SQL: | SELECT value FROM items AS ikob
WHERE value > (
SELECT COUNT(amount) FROM orders AS kab
WHERE kab.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09754 | train |
v1 | Schema:
customers (alias: lex)(id, name, amount, status)
tasks(date, level, value, salary)
Task: Select value from customers where status exists in tasks for the same level.
SQL: | SELECT value FROM customers AS lex
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "tasks",
"outer_alias": "lex",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09755 | train |
v1 | Schema:
items (alias: ikob)(value, name, type, date)
employees(status, level, id, date)
Task: Retrieve id from items whose id is found in employees rows where id matches the outer record.
SQL: | SELECT id FROM items AS ikob
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09756 | train |
v1 | Schema:
orders (alias: kab)(type, status, salary, amount)
requests(value, type, status, salary)
Task: Find value from orders where status appears in requests entries with matching level.
SQL: | SELECT value FROM orders AS kab
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "requests",
"outer_alias": "kab",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09757 | train |
v2 | Schema:
accounts (alias: jac)(amount, id, value, level)
departments(value, date, type, status)
Task: Find code from accounts where a matching record exists in departments with the same status.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09758 | train |
v1 | Schema:
managers (alias: hac)(id, date, code, status)
departments(id, salary, code, date)
Task: Retrieve id from managers whose type is found in departments rows where type matches the outer record.
SQL: | SELECT id FROM managers AS hac
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09759 | train |
v3 | Schema:
items (alias: ikob)(value, level, id, date)
schedules(status, amount, value, code)
Task: Retrieve code from items with amount above the COUNT(value) of schedules rows sharing the same code.
SQL: | SELECT code FROM items AS ikob
WHERE amount > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09760 | train |
v3 | Schema:
orders (alias: kab)(date, id, amount, value)
categories(date, code, amount, level)
Task: Find id from orders where amount exceeds the count of value from categories for the same level.
SQL: | SELECT id FROM orders AS kab
WHERE amount > (
SELECT COUNT(value) FROM categories AS egiv
WHERE egiv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09761 | train |
v2 | Schema:
requests (alias: ejof)(date, status, value, level)
categories(type, name, value, salary)
Task: Find name from requests where a matching record exists in categories with the same status.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_09762 | train |
v2 | Schema:
projects (alias: uliv)(level, type, id, salary)
invoices(name, value, level, code)
Task: Find code from projects where a matching record exists in invoices with the same status.
SQL: | SELECT code FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "invoices",
"outer_alias": "uliv",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09763 | train |
v3 | Schema:
invoices (alias: fal)(type, salary, level, amount)
sales(status, amount, level, date)
Task: Retrieve amount from invoices with value above the MIN(value) of sales rows sharing the same level.
SQL: | SELECT amount FROM invoices AS fal
WHERE value > (
SELECT MIN(value) FROM sales AS cif
WHERE cif.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09764 | train |
v2 | Schema:
customers (alias: lex)(status, type, code, id)
regions(code, status, name, type)
Task: Find id from customers where a matching record exists in regions with the same id.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09765 | train |
v3 | Schema:
invoices (alias: fal)(status, type, id, level)
orders(level, salary, type, status)
Task: Find id from invoices where amount exceeds the minimum salary from orders for the same code.
SQL: | SELECT id FROM invoices AS fal
WHERE amount > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09766 | train |
v2 | Schema:
projects (alias: uliv)(value, salary, code, level)
staff(name, code, level, salary)
Task: Retrieve value from projects that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09767 | train |
v2 | Schema:
categories (alias: egiv)(name, status, amount, value)
branches(value, type, level, status)
Task: Find value from categories where a matching record exists in branches with the same status.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09768 | train |
v3 | Schema:
tasks (alias: znob)(type, date, code, amount)
orders(amount, date, salary, code)
Task: Retrieve id from tasks with value above the MAX(salary) of orders rows sharing the same status.
SQL: | SELECT id FROM tasks AS znob
WHERE value > (
SELECT MAX(salary) FROM orders AS kab
WHERE kab.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_09769 | train |
v1 | Schema:
invoices (alias: fal)(code, value, date, salary)
departments(level, amount, salary, id)
Task: Retrieve name from invoices whose status is found in departments rows where status matches the outer record.
SQL: | SELECT name FROM invoices AS fal
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "departments",
"outer_alias": "fal",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09770 | train |
v3 | Schema:
transactions (alias: gev)(code, value, salary, id)
regions(type, code, status, salary)
Task: Find name from transactions where value exceeds the count of amount from regions for the same level.
SQL: | SELECT name FROM transactions AS gev
WHERE value > (
SELECT COUNT(amount) FROM regions AS okiv
WHERE okiv.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09771 | train |
v1 | Schema:
projects (alias: uliv)(status, date, salary, value)
categories(amount, code, date, name)
Task: Select name from projects where type exists in categories for the same level.
SQL: | SELECT name FROM projects AS uliv
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09772 | train |
v2 | Schema:
employees (alias: bev)(name, code, status, salary)
orders(name, id, date, value)
Task: Find name from employees where a matching record exists in orders with the same id.
SQL: | SELECT name FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09773 | train |
v2 | Schema:
orders (alias: kab)(name, salary, id, value)
branches(code, salary, type, name)
Task: Retrieve id from orders that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "branches",
"outer_alias": "kab",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09774 | train |
v2 | Schema:
orders (alias: kab)(id, code, name, amount)
projects(amount, type, value, date)
Task: Find value from orders where a matching record exists in projects with the same id.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09775 | train |
v1 | Schema:
items (alias: ikob)(salary, value, id, level)
staff(type, value, name, amount)
Task: Find name from items where id appears in staff entries with matching type.
SQL: | SELECT name FROM items AS ikob
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09776 | train |
v2 | Schema:
customers (alias: lex)(level, id, status, salary)
branches(amount, level, id, value)
Task: Retrieve salary from customers that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT salary FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09777 | train |
v2 | Schema:
categories (alias: egiv)(status, name, date, id)
staff(name, code, value, amount)
Task: Retrieve value from categories that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09778 | train |
v1 | Schema:
customers (alias: lex)(id, date, code, name)
schedules(value, salary, type, status)
Task: Find amount from customers where type appears in schedules entries with matching level.
SQL: | SELECT amount FROM customers AS lex
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09779 | train |
v1 | Schema:
categories (alias: egiv)(level, type, value, salary)
orders(type, id, name, level)
Task: Select name from categories where type exists in orders for the same id.
SQL: | SELECT name FROM categories AS egiv
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_09780 | train |
v1 | Schema:
staff (alias: xnob)(name, value, date, amount)
managers(id, type, value, code)
Task: Retrieve amount from staff whose id is found in managers rows where id matches the outer record.
SQL: | SELECT amount FROM staff AS xnob
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09781 | train |
v1 | Schema:
sales (alias: cif)(amount, salary, code, type)
projects(type, level, name, amount)
Task: Find value from sales where level appears in projects entries with matching status.
SQL: | SELECT value FROM sales AS cif
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09782 | train |
v1 | Schema:
projects (alias: uliv)(salary, value, date, level)
items(salary, date, code, type)
Task: Select amount from projects where code exists in items for the same type.
SQL: | SELECT amount FROM projects AS uliv
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09783 | train |
v2 | Schema:
managers (alias: hac)(code, name, amount, id)
requests(code, amount, date, id)
Task: Retrieve name from managers that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "hac",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09784 | train |
v3 | Schema:
products (alias: nad)(value, date, amount, type)
staff(salary, status, value, date)
Task: Retrieve salary from products with amount above the COUNT(salary) of staff rows sharing the same level.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT COUNT(salary) FROM staff AS xnob
WHERE xnob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09785 | train |
v3 | Schema:
branches (alias: agov)(id, level, date, code)
projects(level, amount, date, name)
Task: Find amount from branches where amount exceeds the count of value from projects for the same code.
SQL: | SELECT amount FROM branches AS agov
WHERE amount > (
SELECT COUNT(value) FROM projects AS uliv
WHERE uliv.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "projects",
"outer_alias": "agov",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09786 | train |
v1 | Schema:
employees (alias: bev)(type, value, id, amount)
departments(status, salary, value, type)
Task: Retrieve amount from employees whose status is found in departments rows where id matches the outer record.
SQL: | SELECT amount FROM employees AS bev
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09787 | train |
v1 | Schema:
shipments (alias: vnob)(salary, date, status, code)
branches(name, salary, date, status)
Task: Find name from shipments where code appears in branches entries with matching code.
SQL: | SELECT name FROM shipments AS vnob
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "branches",
"outer_alias": "vnob",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_09788 | train |
v2 | Schema:
items (alias: ikob)(date, salary, value, name)
requests(code, id, level, date)
Task: Retrieve salary from items that have at least one corresponding entry in requests sharing the same id.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09789 | train |
v3 | Schema:
invoices (alias: fal)(type, date, name, code)
staff(level, date, code, status)
Task: Find salary from invoices where salary exceeds the average amount from staff for the same code.
SQL: | SELECT salary FROM invoices AS fal
WHERE salary > (
SELECT AVG(amount) FROM staff AS xnob
WHERE xnob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09790 | train |
v1 | Schema:
items (alias: ikob)(status, salary, code, name)
regions(amount, salary, date, code)
Task: Retrieve id from items whose type is found in regions rows where id matches the outer record.
SQL: | SELECT id FROM items AS ikob
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "ikob",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_09791 | train |
v3 | Schema:
branches (alias: agov)(id, date, amount, value)
transactions(name, code, type, level)
Task: Find value from branches where amount exceeds the total value from transactions for the same id.
SQL: | SELECT value FROM branches AS agov
WHERE amount > (
SELECT SUM(value) FROM transactions AS gev
WHERE gev.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09792 | train |
v2 | Schema:
branches (alias: agov)(status, type, code, id)
departments(id, code, salary, amount)
Task: Retrieve value from branches that have at least one corresponding entry in departments sharing the same id.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "departments",
"outer_alias": "agov",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09793 | train |
v1 | Schema:
customers (alias: lex)(amount, status, value, date)
accounts(amount, level, salary, date)
Task: Select value from customers where id exists in accounts for the same code.
SQL: | SELECT value FROM customers AS lex
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09794 | train |
v3 | Schema:
accounts (alias: jac)(amount, status, level, code)
sales(amount, name, id, level)
Task: Find value from accounts where amount exceeds the maximum amount from sales for the same level.
SQL: | SELECT value FROM accounts AS jac
WHERE amount > (
SELECT MAX(amount) FROM sales AS cif
WHERE cif.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09795 | train |
v1 | Schema:
projects (alias: uliv)(level, name, amount, type)
staff(value, name, code, type)
Task: Retrieve value from projects whose code is found in staff rows where type matches the outer record.
SQL: | SELECT value FROM projects AS uliv
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_09796 | train |
v3 | Schema:
branches (alias: agov)(name, date, amount, level)
orders(level, salary, value, code)
Task: Retrieve amount from branches with salary above the AVG(value) of orders rows sharing the same type.
SQL: | SELECT amount FROM branches AS agov
WHERE salary > (
SELECT AVG(value) FROM orders AS kab
WHERE kab.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_09797 | train |
v1 | Schema:
staff (alias: xnob)(id, level, name, value)
requests(amount, value, name, salary)
Task: Find amount from staff where type appears in requests entries with matching code.
SQL: | SELECT amount FROM staff AS xnob
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_09798 | train |
v2 | Schema:
products (alias: nad)(amount, id, date, name)
schedules(level, type, salary, code)
Task: Retrieve salary from products that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_09799 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.