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:
managers (alias: hac)(salary, level, type, status)
staff(name, type, amount, id)
Task: Retrieve salary from managers that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05500 | train |
v1 | Schema:
managers (alias: hac)(value, type, salary, name)
invoices(value, id, amount, date)
Task: Select name from managers where status exists in invoices for the same level.
SQL: | SELECT name FROM managers AS hac
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05501 | train |
v1 | Schema:
transactions (alias: gev)(value, date, name, status)
requests(level, date, salary, type)
Task: Retrieve value from transactions whose id is found in requests rows where code matches the outer record.
SQL: | SELECT value FROM transactions AS gev
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05502 | train |
v1 | Schema:
tasks (alias: znob)(value, level, code, amount)
staff(amount, level, value, type)
Task: Find amount from tasks where code appears in staff entries with matching status.
SQL: | SELECT amount FROM tasks AS znob
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05503 | train |
v2 | Schema:
regions (alias: okiv)(id, code, value, level)
categories(id, value, date, type)
Task: Find salary from regions where a matching record exists in categories with the same id.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05504 | train |
v3 | Schema:
managers (alias: hac)(date, salary, name, level)
departments(value, amount, name, status)
Task: Find value from managers where amount exceeds the minimum salary from departments for the same level.
SQL: | SELECT value FROM managers AS hac
WHERE amount > (
SELECT MIN(salary) FROM departments AS dov
WHERE dov.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05505 | train |
v3 | Schema:
products (alias: nad)(salary, id, amount, code)
categories(date, amount, id, name)
Task: Find code from products where amount exceeds the total amount from categories for the same code.
SQL: | SELECT code FROM products AS nad
WHERE amount > (
SELECT SUM(amount) FROM categories AS egiv
WHERE egiv.code = nad.code
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "nad",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05506 | train |
v2 | Schema:
invoices (alias: fal)(value, salary, code, id)
sales(date, level, name, status)
Task: Retrieve id from invoices that have at least one corresponding entry in sales sharing the same code.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05507 | train |
v2 | Schema:
departments (alias: dov)(type, salary, date, level)
regions(status, level, type, code)
Task: Retrieve code from departments that have at least one corresponding entry in regions sharing the same level.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05508 | train |
v3 | Schema:
requests (alias: ejof)(code, amount, id, status)
projects(salary, level, value, status)
Task: Find name from requests where salary exceeds the maximum amount from projects for the same level.
SQL: | SELECT name FROM requests AS ejof
WHERE salary > (
SELECT MAX(amount) FROM projects AS uliv
WHERE uliv.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05509 | train |
v1 | Schema:
categories (alias: egiv)(amount, name, code, level)
departments(type, value, amount, date)
Task: Select id from categories where status exists in departments for the same level.
SQL: | SELECT id FROM categories AS egiv
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "departments",
"outer_alias": "egiv",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05510 | train |
v2 | Schema:
regions (alias: okiv)(salary, type, level, value)
staff(name, salary, level, amount)
Task: Retrieve code from regions that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05511 | train |
v1 | Schema:
regions (alias: okiv)(value, type, name, date)
staff(name, level, date, code)
Task: Retrieve amount from regions whose status is found in staff rows where type matches the outer record.
SQL: | SELECT amount FROM regions AS okiv
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05512 | train |
v3 | Schema:
departments (alias: dov)(amount, date, name, value)
employees(value, salary, level, amount)
Task: Retrieve value from departments with amount above the MIN(amount) of employees rows sharing the same code.
SQL: | SELECT value FROM departments AS dov
WHERE amount > (
SELECT MIN(amount) FROM employees AS bev
WHERE bev.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05513 | train |
v3 | Schema:
transactions (alias: gev)(value, salary, type, level)
projects(amount, salary, status, name)
Task: Retrieve id from transactions with salary above the MAX(amount) of projects rows sharing the same level.
SQL: | SELECT id FROM transactions AS gev
WHERE salary > (
SELECT MAX(amount) FROM projects AS uliv
WHERE uliv.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05514 | train |
v3 | Schema:
branches (alias: agov)(amount, level, value, status)
employees(code, type, status, value)
Task: Retrieve code from branches with value above the MIN(value) of employees rows sharing the same id.
SQL: | SELECT code FROM branches AS agov
WHERE value > (
SELECT MIN(value) FROM employees AS bev
WHERE bev.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05515 | train |
v1 | Schema:
invoices (alias: fal)(name, date, value, level)
tasks(value, status, type, name)
Task: Retrieve code from invoices whose status is found in tasks rows where status matches the outer record.
SQL: | SELECT code FROM invoices AS fal
WHERE status IN (
SELECT status FROM tasks AS znob
WHERE znob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "tasks",
"outer_alias": "fal",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05516 | train |
v2 | Schema:
tasks (alias: znob)(type, value, level, id)
categories(level, type, amount, name)
Task: Retrieve code from tasks that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05517 | train |
v2 | Schema:
managers (alias: hac)(level, salary, name, id)
customers(amount, salary, name, code)
Task: Retrieve salary from managers that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05518 | train |
v2 | Schema:
sales (alias: cif)(id, status, type, amount)
regions(date, value, id, status)
Task: Retrieve name from sales that have at least one corresponding entry in regions sharing the same code.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05519 | train |
v2 | Schema:
employees (alias: bev)(status, salary, date, id)
orders(amount, type, level, salary)
Task: Find code from employees where a matching record exists in orders with the same level.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05520 | train |
v2 | Schema:
transactions (alias: gev)(id, name, value, salary)
products(salary, type, code, status)
Task: Find salary from transactions where a matching record exists in products with the same level.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05521 | train |
v2 | Schema:
items (alias: ikob)(amount, name, code, type)
tasks(salary, code, date, type)
Task: Find code from items where a matching record exists in tasks with the same level.
SQL: | SELECT code FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05522 | train |
v3 | Schema:
requests (alias: ejof)(code, salary, type, level)
transactions(salary, level, date, code)
Task: Retrieve salary from requests with value above the MAX(salary) of transactions rows sharing the same code.
SQL: | SELECT salary FROM requests AS ejof
WHERE value > (
SELECT MAX(salary) FROM transactions AS gev
WHERE gev.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05523 | train |
v3 | Schema:
branches (alias: agov)(type, amount, date, code)
managers(id, level, value, name)
Task: Find name from branches where amount exceeds the minimum value from managers for the same status.
SQL: | SELECT name FROM branches AS agov
WHERE amount > (
SELECT MIN(value) FROM managers AS hac
WHERE hac.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05524 | train |
v1 | Schema:
orders (alias: kab)(amount, salary, name, level)
products(salary, code, name, value)
Task: Select amount from orders where level exists in products for the same status.
SQL: | SELECT amount FROM orders AS kab
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05525 | train |
v3 | Schema:
orders (alias: kab)(value, amount, level, code)
products(level, amount, id, type)
Task: Find name from orders where value exceeds the count of amount from products for the same type.
SQL: | SELECT name FROM orders AS kab
WHERE value > (
SELECT COUNT(amount) FROM products AS nad
WHERE nad.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05526 | train |
v1 | Schema:
staff (alias: xnob)(id, status, date, level)
requests(code, value, name, level)
Task: Find name from staff where id appears in requests entries with matching id.
SQL: | SELECT name FROM staff AS xnob
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05527 | train |
v2 | Schema:
accounts (alias: jac)(salary, amount, level, date)
departments(id, value, name, salary)
Task: Find code from accounts where a matching record exists in departments with the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "departments",
"outer_alias": "jac",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05528 | train |
v2 | Schema:
projects (alias: uliv)(code, amount, id, level)
employees(code, type, value, date)
Task: Retrieve code from projects that have at least one corresponding entry in employees sharing the same level.
SQL: | SELECT code FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05529 | train |
v3 | Schema:
requests (alias: ejof)(date, id, status, code)
sales(salary, type, name, amount)
Task: Retrieve id from requests with amount above the MIN(value) of sales rows sharing the same level.
SQL: | SELECT id FROM requests AS ejof
WHERE amount > (
SELECT MIN(value) FROM sales AS cif
WHERE cif.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05530 | train |
v2 | Schema:
departments (alias: dov)(level, status, type, amount)
shipments(level, code, value, id)
Task: Retrieve name from departments that have at least one corresponding entry in shipments sharing the same level.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dov",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05531 | train |
v3 | Schema:
invoices (alias: fal)(code, name, status, date)
projects(salary, date, level, type)
Task: Retrieve code from invoices with value above the COUNT(amount) of projects rows sharing the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT COUNT(amount) FROM projects AS uliv
WHERE uliv.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "projects",
"outer_alias": "fal",
"inner_alias": "uliv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05532 | train |
v3 | Schema:
invoices (alias: fal)(salary, date, code, level)
customers(salary, type, level, value)
Task: Retrieve code from invoices with amount above the AVG(salary) of customers rows sharing the same level.
SQL: | SELECT code FROM invoices AS fal
WHERE amount > (
SELECT AVG(salary) FROM customers AS lex
WHERE lex.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05533 | train |
v3 | Schema:
shipments (alias: vnob)(amount, code, name, id)
products(amount, type, status, name)
Task: Find name from shipments where salary exceeds the average value from products for the same code.
SQL: | SELECT name FROM shipments AS vnob
WHERE salary > (
SELECT AVG(value) FROM products AS nad
WHERE nad.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05534 | train |
v3 | Schema:
managers (alias: hac)(id, salary, value, status)
customers(code, amount, salary, id)
Task: Find name from managers where value exceeds the total salary from customers for the same level.
SQL: | SELECT name FROM managers AS hac
WHERE value > (
SELECT SUM(salary) FROM customers AS lex
WHERE lex.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05535 | train |
v1 | Schema:
orders (alias: kab)(value, level, amount, id)
categories(level, salary, value, date)
Task: Retrieve id from orders whose code is found in categories rows where code matches the outer record.
SQL: | SELECT id FROM orders AS kab
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05536 | train |
v3 | Schema:
projects (alias: uliv)(value, salary, type, name)
departments(level, salary, type, id)
Task: Retrieve value from projects with value above the SUM(salary) of departments rows sharing the same code.
SQL: | SELECT value FROM projects AS uliv
WHERE value > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "departments",
"outer_alias": "uliv",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05537 | train |
v1 | Schema:
managers (alias: hac)(level, status, salary, code)
customers(name, level, date, status)
Task: Retrieve value from managers whose status is found in customers rows where status matches the outer record.
SQL: | SELECT value FROM managers AS hac
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05538 | train |
v2 | Schema:
managers (alias: hac)(code, id, salary, level)
tasks(name, date, type, amount)
Task: Find salary from managers where a matching record exists in tasks with the same id.
SQL: | SELECT salary FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "tasks",
"outer_alias": "hac",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05539 | train |
v1 | Schema:
requests (alias: ejof)(date, value, status, salary)
items(type, id, salary, value)
Task: Select value from requests where type exists in items for the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE type IN (
SELECT type FROM items AS ikob
WHERE ikob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05540 | train |
v2 | Schema:
accounts (alias: jac)(salary, date, id, value)
customers(value, level, type, name)
Task: Retrieve id from accounts that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT id FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05541 | train |
v1 | Schema:
employees (alias: bev)(level, amount, status, code)
categories(amount, code, level, salary)
Task: Retrieve value from employees whose code is found in categories rows where id matches the outer record.
SQL: | SELECT value FROM employees AS bev
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05542 | train |
v2 | Schema:
departments (alias: dov)(type, value, date, name)
accounts(level, salary, name, value)
Task: Retrieve salary from departments that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "accounts",
"outer_alias": "dov",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05543 | train |
v3 | Schema:
transactions (alias: gev)(name, code, date, id)
customers(code, level, type, id)
Task: Retrieve salary from transactions with salary above the MAX(value) of customers rows sharing the same level.
SQL: | SELECT salary FROM transactions AS gev
WHERE salary > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05544 | train |
v1 | Schema:
employees (alias: bev)(salary, level, amount, value)
shipments(name, date, level, value)
Task: Select name from employees where status exists in shipments for the same type.
SQL: | SELECT name FROM employees AS bev
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05545 | train |
v1 | Schema:
regions (alias: okiv)(code, date, level, type)
accounts(type, status, code, id)
Task: Select name from regions where status exists in accounts for the same code.
SQL: | SELECT name FROM regions AS okiv
WHERE status IN (
SELECT status FROM accounts AS jac
WHERE jac.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "accounts",
"outer_alias": "okiv",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05546 | train |
v1 | Schema:
staff (alias: xnob)(amount, level, code, status)
projects(salary, code, status, name)
Task: Retrieve id from staff whose id is found in projects rows where id matches the outer record.
SQL: | SELECT id FROM staff AS xnob
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05547 | train |
v2 | Schema:
items (alias: ikob)(status, date, id, value)
shipments(type, id, code, date)
Task: Find amount from items where a matching record exists in shipments with the same id.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05548 | train |
v2 | Schema:
schedules (alias: vmob)(amount, type, name, date)
accounts(value, amount, id, code)
Task: Retrieve code from schedules that have at least one corresponding entry in accounts sharing the same code.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05549 | train |
v3 | Schema:
tasks (alias: znob)(id, salary, name, date)
projects(date, id, level, amount)
Task: Find value from tasks where value exceeds the count of amount from projects for the same level.
SQL: | SELECT value FROM tasks AS znob
WHERE value > (
SELECT COUNT(amount) FROM projects AS uliv
WHERE uliv.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "projects",
"outer_alias": "znob",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05550 | train |
v1 | Schema:
staff (alias: xnob)(level, id, amount, date)
customers(code, type, name, amount)
Task: Retrieve value from staff whose code is found in customers rows where id matches the outer record.
SQL: | SELECT value FROM staff AS xnob
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05551 | train |
v3 | Schema:
orders (alias: kab)(level, salary, value, id)
regions(value, level, status, amount)
Task: Find code from orders where salary exceeds the total salary from regions for the same status.
SQL: | SELECT code FROM orders AS kab
WHERE salary > (
SELECT SUM(salary) FROM regions AS okiv
WHERE okiv.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05552 | train |
v2 | Schema:
invoices (alias: fal)(status, id, amount, code)
transactions(amount, date, value, code)
Task: Retrieve id from invoices that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05553 | train |
v2 | Schema:
tasks (alias: znob)(value, salary, date, type)
transactions(level, name, value, code)
Task: Retrieve amount from tasks that have at least one corresponding entry in transactions sharing the same level.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05554 | train |
v1 | Schema:
tasks (alias: znob)(date, id, level, salary)
categories(status, code, type, id)
Task: Find name from tasks where id appears in categories entries with matching level.
SQL: | SELECT name FROM tasks AS znob
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05555 | train |
v2 | Schema:
shipments (alias: vnob)(level, type, status, value)
projects(name, id, status, date)
Task: Find code from shipments where a matching record exists in projects with the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05556 | train |
v1 | Schema:
invoices (alias: fal)(code, amount, date, status)
customers(salary, amount, value, name)
Task: Retrieve name from invoices whose code is found in customers rows where code matches the outer record.
SQL: | SELECT name FROM invoices AS fal
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05557 | train |
v2 | Schema:
invoices (alias: fal)(status, amount, id, level)
sales(date, level, salary, name)
Task: Find code from invoices where a matching record exists in sales with the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05558 | train |
v3 | Schema:
tasks (alias: znob)(amount, level, salary, id)
projects(name, date, type, value)
Task: Find id from tasks where salary exceeds the minimum salary from projects for the same level.
SQL: | SELECT id FROM tasks AS znob
WHERE salary > (
SELECT MIN(salary) FROM projects AS uliv
WHERE uliv.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "projects",
"outer_alias": "znob",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05559 | train |
v3 | Schema:
accounts (alias: jac)(id, status, level, code)
sales(level, salary, id, type)
Task: Retrieve code from accounts with value above the SUM(value) of sales rows sharing the same status.
SQL: | SELECT code FROM accounts AS jac
WHERE value > (
SELECT SUM(value) FROM sales AS cif
WHERE cif.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05560 | train |
v1 | Schema:
invoices (alias: fal)(type, date, value, code)
transactions(value, name, date, type)
Task: Select code from invoices where id exists in transactions for the same code.
SQL: | SELECT code FROM invoices AS fal
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05561 | train |
v1 | Schema:
transactions (alias: gev)(code, name, date, level)
managers(date, type, code, amount)
Task: Find value from transactions where id appears in managers entries with matching id.
SQL: | SELECT value FROM transactions AS gev
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "managers",
"outer_alias": "gev",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05562 | train |
v1 | Schema:
branches (alias: agov)(code, salary, value, name)
transactions(salary, amount, date, level)
Task: Retrieve name from branches whose level is found in transactions rows where type matches the outer record.
SQL: | SELECT name FROM branches AS agov
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05563 | train |
v1 | Schema:
schedules (alias: vmob)(id, name, level, status)
branches(name, type, value, amount)
Task: Find code from schedules where type appears in branches entries with matching code.
SQL: | SELECT code FROM schedules AS vmob
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05564 | train |
v1 | Schema:
products (alias: nad)(salary, amount, name, status)
requests(code, amount, name, date)
Task: Find amount from products where id appears in requests entries with matching type.
SQL: | SELECT amount FROM products AS nad
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.type = nad.type
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05565 | train |
v3 | Schema:
requests (alias: ejof)(status, date, level, code)
categories(id, value, level, date)
Task: Retrieve salary from requests with value above the AVG(value) of categories rows sharing the same id.
SQL: | SELECT salary FROM requests AS ejof
WHERE value > (
SELECT AVG(value) FROM categories AS egiv
WHERE egiv.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05566 | train |
v2 | Schema:
departments (alias: dov)(code, id, level, salary)
transactions(code, level, date, status)
Task: Retrieve value from departments that have at least one corresponding entry in transactions sharing the same code.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05567 | train |
v3 | Schema:
products (alias: nad)(name, type, amount, value)
branches(level, name, amount, id)
Task: Find amount from products where amount exceeds the count of amount from branches for the same code.
SQL: | SELECT amount FROM products AS nad
WHERE amount > (
SELECT COUNT(amount) FROM branches AS agov
WHERE agov.code = nad.code
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05568 | train |
v3 | Schema:
projects (alias: uliv)(amount, level, salary, date)
tasks(value, date, code, level)
Task: Find value from projects where amount exceeds the maximum amount from tasks for the same type.
SQL: | SELECT value FROM projects AS uliv
WHERE amount > (
SELECT MAX(amount) FROM tasks AS znob
WHERE znob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "tasks",
"outer_alias": "uliv",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05569 | train |
v3 | Schema:
customers (alias: lex)(value, status, date, amount)
products(type, id, name, amount)
Task: Retrieve code from customers with salary above the AVG(amount) of products rows sharing the same level.
SQL: | SELECT code FROM customers AS lex
WHERE salary > (
SELECT AVG(amount) FROM products AS nad
WHERE nad.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05570 | train |
v3 | Schema:
managers (alias: hac)(date, level, salary, code)
employees(type, code, level, status)
Task: Retrieve name from managers with amount above the COUNT(salary) of employees rows sharing the same type.
SQL: | SELECT name FROM managers AS hac
WHERE amount > (
SELECT COUNT(salary) FROM employees AS bev
WHERE bev.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05571 | train |
v1 | Schema:
staff (alias: xnob)(value, level, salary, date)
accounts(level, amount, salary, type)
Task: Retrieve name from staff whose code is found in accounts rows where type matches the outer record.
SQL: | SELECT name FROM staff AS xnob
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05572 | train |
v1 | Schema:
tasks (alias: znob)(salary, id, value, type)
transactions(value, amount, id, type)
Task: Find name from tasks where type appears in transactions entries with matching code.
SQL: | SELECT name FROM tasks AS znob
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05573 | train |
v1 | Schema:
departments (alias: dov)(code, level, date, type)
employees(type, value, name, code)
Task: Select code from departments where type exists in employees for the same code.
SQL: | SELECT code FROM departments AS dov
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05574 | train |
v1 | Schema:
shipments (alias: vnob)(value, id, type, salary)
staff(status, amount, type, value)
Task: Select value from shipments where code exists in staff for the same id.
SQL: | SELECT value FROM shipments AS vnob
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05575 | train |
v2 | Schema:
items (alias: ikob)(level, salary, date, status)
shipments(value, level, id, status)
Task: Find name from items where a matching record exists in shipments with the same id.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05576 | train |
v2 | Schema:
sales (alias: cif)(value, type, status, amount)
invoices(type, salary, code, status)
Task: Retrieve code from sales that have at least one corresponding entry in invoices sharing the same code.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05577 | train |
v1 | Schema:
employees (alias: bev)(level, salary, id, amount)
sales(level, code, status, amount)
Task: Retrieve amount from employees whose code is found in sales rows where level matches the outer record.
SQL: | SELECT amount FROM employees AS bev
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "bev",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05578 | train |
v3 | Schema:
schedules (alias: vmob)(salary, id, type, status)
shipments(name, date, salary, type)
Task: Find name from schedules where value exceeds the total salary from shipments for the same id.
SQL: | SELECT name FROM schedules AS vmob
WHERE value > (
SELECT SUM(salary) FROM shipments AS vnob
WHERE vnob.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05579 | train |
v1 | Schema:
customers (alias: lex)(type, id, level, date)
products(level, salary, name, id)
Task: Find value from customers where id appears in products entries with matching status.
SQL: | SELECT value FROM customers AS lex
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "products",
"outer_alias": "lex",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05580 | train |
v2 | Schema:
categories (alias: egiv)(value, name, date, level)
managers(date, value, name, level)
Task: Find name from categories where a matching record exists in managers with the same id.
SQL: | SELECT name FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "egiv",
"inner_alias": "hac",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05581 | train |
v2 | Schema:
schedules (alias: vmob)(id, name, salary, value)
customers(code, salary, name, status)
Task: Find salary from schedules where a matching record exists in customers with the same level.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05582 | train |
v2 | Schema:
shipments (alias: vnob)(name, status, amount, value)
requests(code, type, status, amount)
Task: Retrieve code from shipments that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05583 | train |
v2 | Schema:
tasks (alias: znob)(status, type, level, salary)
customers(code, name, status, amount)
Task: Retrieve salary from tasks that have at least one corresponding entry in customers sharing the same code.
SQL: | SELECT salary FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05584 | train |
v3 | Schema:
invoices (alias: fal)(salary, type, name, value)
branches(name, code, value, date)
Task: Retrieve salary from invoices with amount above the AVG(value) of branches rows sharing the same type.
SQL: | SELECT salary FROM invoices AS fal
WHERE amount > (
SELECT AVG(value) FROM branches AS agov
WHERE agov.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "branches",
"outer_alias": "fal",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05585 | train |
v3 | Schema:
regions (alias: okiv)(type, amount, level, value)
items(status, level, type, code)
Task: Find name from regions where salary exceeds the maximum value from items for the same status.
SQL: | SELECT name FROM regions AS okiv
WHERE salary > (
SELECT MAX(value) FROM items AS ikob
WHERE ikob.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05586 | train |
v2 | Schema:
accounts (alias: jac)(level, name, code, type)
customers(level, status, type, name)
Task: Find salary from accounts where a matching record exists in customers with the same level.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05587 | train |
v1 | Schema:
departments (alias: dov)(salary, type, date, status)
staff(name, id, status, level)
Task: Retrieve code from departments whose type is found in staff rows where code matches the outer record.
SQL: | SELECT code FROM departments AS dov
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05588 | train |
v3 | Schema:
projects (alias: uliv)(name, date, status, id)
invoices(value, name, type, amount)
Task: Find amount from projects where amount exceeds the count of salary from invoices for the same type.
SQL: | SELECT amount FROM projects AS uliv
WHERE amount > (
SELECT COUNT(salary) FROM invoices AS fal
WHERE fal.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "invoices",
"outer_alias": "uliv",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05589 | train |
v2 | Schema:
shipments (alias: vnob)(type, value, code, id)
tasks(date, code, value, name)
Task: Find code from shipments where a matching record exists in tasks with the same code.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "tasks",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05590 | train |
v3 | Schema:
items (alias: ikob)(date, type, amount, status)
products(value, date, salary, type)
Task: Retrieve id from items with salary above the AVG(amount) of products rows sharing the same status.
SQL: | SELECT id FROM items AS ikob
WHERE salary > (
SELECT AVG(amount) FROM products AS nad
WHERE nad.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05591 | train |
v1 | Schema:
categories (alias: egiv)(salary, value, name, id)
tasks(amount, status, code, date)
Task: Find id from categories where code appears in tasks entries with matching level.
SQL: | SELECT id FROM categories AS egiv
WHERE code IN (
SELECT code FROM tasks AS znob
WHERE znob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "tasks",
"outer_alias": "egiv",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05592 | train |
v2 | Schema:
accounts (alias: jac)(salary, id, status, name)
shipments(type, name, value, code)
Task: Retrieve name from accounts that have at least one corresponding entry in shipments sharing the same code.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05593 | train |
v3 | Schema:
branches (alias: agov)(amount, name, level, id)
staff(date, value, id, code)
Task: Find id from branches where salary exceeds the count of value from staff for the same code.
SQL: | SELECT id FROM branches AS agov
WHERE salary > (
SELECT COUNT(value) FROM staff AS xnob
WHERE xnob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05594 | train |
v1 | Schema:
sales (alias: cif)(salary, name, amount, id)
customers(type, id, code, value)
Task: Select name from sales where type exists in customers for the same id.
SQL: | SELECT name FROM sales AS cif
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05595 | train |
v2 | Schema:
employees (alias: bev)(value, amount, level, name)
departments(amount, type, date, salary)
Task: Retrieve amount from employees that have at least one corresponding entry in departments sharing the same id.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05596 | train |
v2 | Schema:
customers (alias: lex)(value, date, name, amount)
regions(value, salary, level, type)
Task: Retrieve amount from customers that have at least one corresponding entry in regions sharing the same code.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05597 | train |
v2 | Schema:
items (alias: ikob)(date, status, amount, level)
branches(date, status, name, value)
Task: Retrieve code from items that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT code 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": "code",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05598 | train |
v2 | Schema:
shipments (alias: vnob)(date, type, value, amount)
regions(date, salary, value, amount)
Task: Retrieve value from shipments that have at least one corresponding entry in regions sharing the same level.
SQL: | SELECT value FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05599 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.