variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v3 | Schema:
schedules (alias: vmob)(code, salary, level, name)
accounts(level, salary, amount, name)
Task: Retrieve id from schedules with value above the MIN(salary) of accounts rows sharing the same status.
SQL: | SELECT id FROM schedules AS vmob
WHERE value > (
SELECT MIN(salary) FROM accounts AS jac
WHERE jac.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04700 | train |
v1 | Schema:
requests (alias: ejof)(type, name, level, value)
staff(type, amount, status, code)
Task: Find salary from requests where code appears in staff entries with matching level.
SQL: | SELECT salary FROM requests AS ejof
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04701 | train |
v3 | Schema:
items (alias: ikob)(status, level, code, amount)
branches(value, salary, name, level)
Task: Find code from items where amount exceeds the maximum value from branches for the same level.
SQL: | SELECT code FROM items AS ikob
WHERE amount > (
SELECT MAX(value) 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": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04702 | train |
v1 | Schema:
invoices (alias: fal)(id, code, type, value)
accounts(value, date, type, id)
Task: Retrieve code from invoices whose code is found in accounts rows where type matches the outer record.
SQL: | SELECT code FROM invoices AS fal
WHERE code IN (
SELECT code FROM accounts AS jac
WHERE jac.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04703 | train |
v3 | Schema:
products (alias: nad)(value, code, type, date)
staff(level, value, status, date)
Task: Find name from products where amount exceeds the count of salary from staff for the same type.
SQL: | SELECT name FROM products AS nad
WHERE amount > (
SELECT COUNT(salary) FROM staff AS xnob
WHERE xnob.type = nad.type
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04704 | train |
v3 | Schema:
items (alias: ikob)(date, salary, id, type)
orders(level, value, amount, status)
Task: Find name from items where amount exceeds the minimum salary from orders for the same type.
SQL: | SELECT name FROM items AS ikob
WHERE amount > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04705 | train |
v2 | Schema:
employees (alias: bev)(type, name, level, salary)
accounts(salary, type, name, value)
Task: Retrieve salary from employees that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04706 | train |
v3 | Schema:
items (alias: ikob)(date, status, id, value)
projects(salary, id, value, type)
Task: Find amount from items where salary exceeds the total amount from projects for the same id.
SQL: | SELECT amount FROM items AS ikob
WHERE salary > (
SELECT SUM(amount) FROM projects AS uliv
WHERE uliv.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04707 | train |
v1 | Schema:
items (alias: ikob)(level, code, type, value)
invoices(amount, level, id, type)
Task: Select id from items where level exists in invoices for the same code.
SQL: | SELECT id FROM items AS ikob
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04708 | train |
v1 | Schema:
invoices (alias: fal)(code, amount, level, date)
staff(type, status, name, id)
Task: Retrieve id from invoices whose status is found in staff rows where code matches the outer record.
SQL: | SELECT id FROM invoices AS fal
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04709 | train |
v3 | Schema:
branches (alias: agov)(amount, status, value, date)
tasks(code, type, name, value)
Task: Find salary from branches where salary exceeds the average value from tasks for the same type.
SQL: | SELECT salary FROM branches AS agov
WHERE salary > (
SELECT AVG(value) FROM tasks AS znob
WHERE znob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "salary",
"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_04710 | train |
v2 | Schema:
schedules (alias: vmob)(name, amount, type, level)
items(code, name, id, date)
Task: Find salary from schedules where a matching record exists in items with the same code.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04711 | train |
v3 | Schema:
customers (alias: lex)(type, amount, status, code)
sales(value, status, code, level)
Task: Find salary from customers where amount exceeds the average amount from sales for the same level.
SQL: | SELECT salary FROM customers AS lex
WHERE amount > (
SELECT AVG(amount) FROM sales AS cif
WHERE cif.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04712 | train |
v1 | Schema:
items (alias: ikob)(id, type, amount, code)
departments(status, salary, type, date)
Task: Select salary from items where id exists in departments for the same id.
SQL: | SELECT salary FROM items AS ikob
WHERE id IN (
SELECT id FROM departments AS dov
WHERE dov.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "departments",
"outer_alias": "ikob",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04713 | train |
v1 | Schema:
employees (alias: bev)(code, status, id, value)
staff(level, status, salary, code)
Task: Select id from employees where type exists in staff for the same level.
SQL: | SELECT id FROM employees AS bev
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04714 | train |
v3 | Schema:
requests (alias: ejof)(date, level, type, value)
invoices(name, date, level, code)
Task: Find id from requests where value exceeds the maximum amount from invoices for the same code.
SQL: | SELECT id FROM requests AS ejof
WHERE value > (
SELECT MAX(amount) FROM invoices AS fal
WHERE fal.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04715 | train |
v3 | Schema:
customers (alias: lex)(name, level, id, amount)
requests(code, date, status, amount)
Task: Retrieve code from customers with value above the MAX(amount) of requests rows sharing the same type.
SQL: | SELECT code FROM customers AS lex
WHERE value > (
SELECT MAX(amount) FROM requests AS ejof
WHERE ejof.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "requests",
"outer_alias": "lex",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04716 | train |
v2 | Schema:
managers (alias: hac)(status, id, date, name)
products(amount, code, level, type)
Task: Retrieve code from managers that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT code FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "products",
"outer_alias": "hac",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04717 | train |
v3 | Schema:
employees (alias: bev)(amount, name, date, code)
tasks(name, type, amount, value)
Task: Find id from employees where salary exceeds the average amount from tasks for the same id.
SQL: | SELECT id FROM employees AS bev
WHERE salary > (
SELECT AVG(amount) FROM tasks AS znob
WHERE znob.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04718 | train |
v2 | Schema:
categories (alias: egiv)(id, date, code, type)
branches(name, type, id, status)
Task: Retrieve id from categories that have at least one corresponding entry in branches sharing the same status.
SQL: | SELECT id 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": "id",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04719 | train |
v2 | Schema:
transactions (alias: gev)(date, value, amount, level)
branches(salary, amount, value, code)
Task: Find value from transactions where a matching record exists in branches with the same code.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "branches",
"outer_alias": "gev",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04720 | train |
v2 | Schema:
staff (alias: xnob)(salary, type, level, status)
customers(level, name, status, date)
Task: Find code from staff where a matching record exists in customers with the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04721 | train |
v3 | Schema:
staff (alias: xnob)(name, date, type, value)
shipments(date, type, amount, salary)
Task: Find amount from staff where salary exceeds the maximum amount from shipments for the same status.
SQL: | SELECT amount FROM staff AS xnob
WHERE salary > (
SELECT MAX(amount) FROM shipments AS vnob
WHERE vnob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04722 | train |
v3 | Schema:
sales (alias: cif)(amount, name, value, level)
projects(amount, salary, type, name)
Task: Retrieve salary from sales with value above the AVG(value) of projects rows sharing the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE value > (
SELECT AVG(value) FROM projects AS uliv
WHERE uliv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04723 | train |
v3 | Schema:
products (alias: nad)(type, amount, id, code)
sales(code, status, value, amount)
Task: Retrieve amount from products with value above the MAX(value) of sales rows sharing the same code.
SQL: | SELECT amount FROM products AS nad
WHERE value > (
SELECT MAX(value) FROM sales AS cif
WHERE cif.code = nad.code
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04724 | train |
v3 | Schema:
invoices (alias: fal)(salary, name, level, status)
transactions(salary, date, status, type)
Task: Retrieve salary from invoices with salary above the SUM(value) of transactions rows sharing the same status.
SQL: | SELECT salary FROM invoices AS fal
WHERE salary > (
SELECT SUM(value) FROM transactions AS gev
WHERE gev.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04725 | train |
v1 | Schema:
branches (alias: agov)(code, name, status, value)
requests(value, date, salary, level)
Task: Find salary from branches where status appears in requests entries with matching code.
SQL: | SELECT salary FROM branches AS agov
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04726 | train |
v3 | Schema:
orders (alias: kab)(level, date, value, amount)
tasks(code, id, type, name)
Task: Retrieve id from orders with salary above the AVG(value) of tasks rows sharing the same type.
SQL: | SELECT id FROM orders AS kab
WHERE salary > (
SELECT AVG(value) FROM tasks AS znob
WHERE znob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "tasks",
"outer_alias": "kab",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04727 | train |
v2 | Schema:
branches (alias: agov)(amount, name, value, salary)
categories(level, value, type, date)
Task: Retrieve name from branches that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04728 | train |
v1 | Schema:
regions (alias: okiv)(amount, value, type, status)
branches(level, status, amount, value)
Task: Retrieve amount from regions whose level is found in branches rows where type matches the outer record.
SQL: | SELECT amount FROM regions AS okiv
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04729 | train |
v1 | Schema:
transactions (alias: gev)(type, date, name, level)
employees(salary, date, name, amount)
Task: Select salary from transactions where type exists in employees for the same level.
SQL: | SELECT salary FROM transactions AS gev
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "employees",
"outer_alias": "gev",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04730 | train |
v1 | Schema:
departments (alias: dov)(value, level, status, code)
requests(id, code, value, name)
Task: Select id from departments where code exists in requests for the same id.
SQL: | SELECT id FROM departments AS dov
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "requests",
"outer_alias": "dov",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04731 | train |
v3 | Schema:
items (alias: ikob)(type, name, salary, level)
staff(amount, code, name, status)
Task: Retrieve amount from items with value above the COUNT(salary) of staff rows sharing the same code.
SQL: | SELECT amount FROM items AS ikob
WHERE value > (
SELECT COUNT(salary) FROM staff AS xnob
WHERE xnob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04732 | train |
v2 | Schema:
customers (alias: lex)(amount, name, date, id)
orders(type, date, id, status)
Task: Retrieve code from customers that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04733 | train |
v2 | Schema:
invoices (alias: fal)(id, type, name, value)
schedules(salary, code, date, value)
Task: Retrieve amount from invoices that have at least one corresponding entry in schedules sharing the same code.
SQL: | SELECT amount FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04734 | train |
v3 | Schema:
shipments (alias: vnob)(amount, name, code, salary)
transactions(status, salary, type, id)
Task: Retrieve id from shipments with value above the COUNT(amount) of transactions rows sharing the same status.
SQL: | SELECT id FROM shipments AS vnob
WHERE value > (
SELECT COUNT(amount) FROM transactions AS gev
WHERE gev.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04735 | train |
v3 | Schema:
managers (alias: hac)(date, name, type, amount)
accounts(id, salary, type, value)
Task: Retrieve name from managers with value above the MIN(amount) of accounts rows sharing the same type.
SQL: | SELECT name FROM managers AS hac
WHERE value > (
SELECT MIN(amount) FROM accounts AS jac
WHERE jac.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "accounts",
"outer_alias": "hac",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04736 | train |
v3 | Schema:
accounts (alias: jac)(date, code, amount, value)
orders(type, salary, id, date)
Task: Find name from accounts where amount exceeds the count of value from orders for the same code.
SQL: | SELECT name FROM accounts AS jac
WHERE amount > (
SELECT COUNT(value) FROM orders AS kab
WHERE kab.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04737 | train |
v3 | Schema:
regions (alias: okiv)(amount, code, date, id)
items(salary, level, name, value)
Task: Retrieve salary from regions with amount above the AVG(salary) of items rows sharing the same id.
SQL: | SELECT salary FROM regions AS okiv
WHERE amount > (
SELECT AVG(salary) FROM items AS ikob
WHERE ikob.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04738 | train |
v1 | Schema:
managers (alias: hac)(name, id, status, type)
items(date, code, value, name)
Task: Select code from managers where code exists in items for the same type.
SQL: | SELECT code FROM managers AS hac
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04739 | train |
v1 | Schema:
departments (alias: dov)(salary, code, amount, name)
orders(level, type, amount, code)
Task: Retrieve salary from departments whose level is found in orders rows where id matches the outer record.
SQL: | SELECT salary FROM departments AS dov
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04740 | train |
v3 | Schema:
staff (alias: xnob)(value, salary, level, id)
tasks(amount, level, status, date)
Task: Find code from staff where amount exceeds the average value from tasks for the same code.
SQL: | SELECT code FROM staff AS xnob
WHERE amount > (
SELECT AVG(value) FROM tasks AS znob
WHERE znob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04741 | train |
v2 | Schema:
regions (alias: okiv)(name, value, date, amount)
items(id, type, level, code)
Task: Find name from regions where a matching record exists in items with the same code.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04742 | train |
v3 | Schema:
staff (alias: xnob)(name, id, amount, level)
employees(code, name, salary, date)
Task: Retrieve id from staff with salary above the SUM(amount) of employees rows sharing the same level.
SQL: | SELECT id FROM staff AS xnob
WHERE salary > (
SELECT SUM(amount) FROM employees AS bev
WHERE bev.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04743 | train |
v1 | Schema:
customers (alias: lex)(id, code, type, value)
items(salary, type, amount, code)
Task: Find amount from customers where id appears in items entries with matching code.
SQL: | SELECT amount FROM customers AS lex
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04744 | train |
v2 | Schema:
accounts (alias: jac)(id, salary, amount, name)
transactions(name, level, value, id)
Task: Retrieve salary from accounts that have at least one corresponding entry in transactions sharing the same code.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04745 | train |
v3 | Schema:
projects (alias: uliv)(id, name, level, type)
staff(type, salary, name, value)
Task: Find amount from projects where value exceeds the total amount from staff for the same type.
SQL: | SELECT amount FROM projects AS uliv
WHERE value > (
SELECT SUM(amount) FROM staff AS xnob
WHERE xnob.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04746 | train |
v1 | Schema:
departments (alias: dov)(type, id, status, value)
employees(date, salary, name, id)
Task: Find code from departments where type appears in employees entries with matching 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_04747 | train |
v2 | Schema:
departments (alias: dov)(level, code, status, id)
sales(type, code, level, date)
Task: Find value from departments where a matching record exists in sales with the same level.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04748 | train |
v2 | Schema:
categories (alias: egiv)(amount, date, status, code)
schedules(date, code, status, type)
Task: Find code from categories where a matching record exists in schedules with the same code.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04749 | train |
v1 | Schema:
departments (alias: dov)(id, date, salary, value)
categories(id, type, name, value)
Task: Retrieve value from departments whose type is found in categories rows where level matches the outer record.
SQL: | SELECT value FROM departments AS dov
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "categories",
"outer_alias": "dov",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04750 | train |
v2 | Schema:
invoices (alias: fal)(amount, id, code, value)
employees(status, id, value, type)
Task: Retrieve value from invoices that have at least one corresponding entry in employees sharing the same status.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04751 | train |
v1 | Schema:
transactions (alias: gev)(level, id, value, amount)
sales(amount, date, level, type)
Task: Select code from transactions where level exists in sales for the same id.
SQL: | SELECT code FROM transactions AS gev
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04752 | train |
v3 | Schema:
branches (alias: agov)(level, date, amount, code)
sales(status, name, value, code)
Task: Find salary from branches where salary exceeds the total salary from sales for the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE salary > (
SELECT SUM(salary) FROM sales AS cif
WHERE cif.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "sales",
"outer_alias": "agov",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04753 | train |
v1 | Schema:
regions (alias: okiv)(code, type, status, amount)
managers(salary, id, level, value)
Task: Find salary from regions where status appears in managers entries with matching status.
SQL: | SELECT salary FROM regions AS okiv
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "managers",
"outer_alias": "okiv",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04754 | train |
v2 | Schema:
projects (alias: uliv)(amount, level, name, id)
regions(value, name, salary, level)
Task: Find value from projects where a matching record exists in regions with the same code.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "regions",
"outer_alias": "uliv",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04755 | train |
v2 | Schema:
items (alias: ikob)(id, status, date, amount)
shipments(level, amount, date, type)
Task: Retrieve name from items that have at least one corresponding entry in shipments sharing the same level.
SQL: | SELECT name FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04756 | train |
v3 | Schema:
accounts (alias: jac)(salary, date, code, id)
transactions(salary, type, code, amount)
Task: Find code from accounts where salary exceeds the maximum value from transactions for the same type.
SQL: | SELECT code FROM accounts AS jac
WHERE salary > (
SELECT MAX(value) FROM transactions AS gev
WHERE gev.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04757 | train |
v1 | Schema:
shipments (alias: vnob)(value, code, id, date)
items(type, amount, name, status)
Task: Select name from shipments where type exists in items for the same level.
SQL: | SELECT name FROM shipments AS vnob
WHERE type IN (
SELECT type FROM items AS ikob
WHERE ikob.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "items",
"outer_alias": "vnob",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04758 | train |
v2 | Schema:
schedules (alias: vmob)(value, salary, status, level)
requests(type, date, id, name)
Task: Find value from schedules where a matching record exists in requests with the same status.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04759 | train |
v2 | Schema:
sales (alias: cif)(id, level, date, code)
branches(id, level, name, salary)
Task: Find amount from sales where a matching record exists in branches with the same level.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04760 | train |
v2 | Schema:
shipments (alias: vnob)(id, code, date, status)
requests(type, status, level, date)
Task: Retrieve salary from shipments that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT salary 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": "salary",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04761 | train |
v3 | Schema:
products (alias: nad)(value, code, date, id)
accounts(name, value, type, id)
Task: Retrieve salary from products with amount above the MAX(value) of accounts rows sharing the same id.
SQL: | SELECT salary FROM products AS nad
WHERE amount > (
SELECT MAX(value) FROM accounts AS jac
WHERE jac.id = nad.id
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04762 | train |
v2 | Schema:
tasks (alias: znob)(code, id, type, name)
items(date, amount, name, id)
Task: Retrieve salary from tasks that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT salary FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04763 | train |
v3 | Schema:
departments (alias: dov)(level, salary, amount, type)
sales(amount, name, date, type)
Task: Retrieve code from departments with value above the COUNT(value) of sales rows sharing the same code.
SQL: | SELECT code FROM departments AS dov
WHERE value > (
SELECT COUNT(value) FROM sales AS cif
WHERE cif.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04764 | train |
v2 | Schema:
customers (alias: lex)(salary, amount, name, level)
items(code, amount, date, value)
Task: Retrieve amount from customers that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04765 | train |
v1 | Schema:
requests (alias: ejof)(code, amount, value, status)
branches(code, id, amount, date)
Task: Find id from requests where level appears in branches entries with matching type.
SQL: | SELECT id FROM requests AS ejof
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04766 | train |
v3 | Schema:
schedules (alias: vmob)(type, amount, date, name)
customers(status, code, salary, type)
Task: Find salary from schedules where value exceeds the count of value from customers for the same type.
SQL: | SELECT salary FROM schedules AS vmob
WHERE value > (
SELECT COUNT(value) FROM customers AS lex
WHERE lex.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04767 | train |
v2 | Schema:
categories (alias: egiv)(amount, value, salary, date)
orders(salary, value, name, status)
Task: Find code from categories where a matching record exists in orders with the same status.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04768 | train |
v3 | Schema:
orders (alias: kab)(salary, status, name, date)
schedules(level, name, date, status)
Task: Retrieve amount from orders with value above the SUM(value) of schedules rows sharing the same id.
SQL: | SELECT amount FROM orders AS kab
WHERE value > (
SELECT SUM(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": "SUM",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04769 | train |
v1 | Schema:
tasks (alias: znob)(status, id, salary, type)
products(value, level, amount, code)
Task: Select salary from tasks where id exists in products for the same type.
SQL: | SELECT salary FROM tasks AS znob
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04770 | train |
v3 | Schema:
branches (alias: agov)(value, type, date, id)
sales(type, name, level, salary)
Task: Retrieve id from branches with value above the SUM(salary) of sales rows sharing the same level.
SQL: | SELECT id FROM branches AS agov
WHERE value > (
SELECT SUM(salary) FROM sales AS cif
WHERE cif.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "sales",
"outer_alias": "agov",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04771 | train |
v1 | Schema:
tasks (alias: znob)(value, id, level, name)
products(status, code, level, name)
Task: Retrieve amount from tasks whose type is found in products rows where id matches the outer record.
SQL: | SELECT amount FROM tasks AS znob
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04772 | train |
v2 | Schema:
transactions (alias: gev)(level, amount, type, name)
tasks(value, level, salary, status)
Task: Find salary from transactions where a matching record exists in tasks with the same code.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04773 | train |
v2 | Schema:
products (alias: nad)(value, id, code, amount)
schedules(name, id, date, value)
Task: Find value from products where a matching record exists in schedules with the same type.
SQL: | SELECT value 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": "value",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04774 | train |
v2 | Schema:
requests (alias: ejof)(date, code, salary, type)
invoices(date, value, name, status)
Task: Retrieve salary from requests that have at least one corresponding entry in invoices sharing the same type.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04775 | train |
v1 | Schema:
transactions (alias: gev)(code, salary, id, level)
branches(name, code, status, date)
Task: Select name from transactions where type exists in branches for the same id.
SQL: | SELECT name FROM transactions AS gev
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "branches",
"outer_alias": "gev",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04776 | train |
v1 | Schema:
transactions (alias: gev)(type, name, salary, id)
regions(date, name, status, id)
Task: Find value from transactions where type appears in regions entries with matching code.
SQL: | SELECT value FROM transactions AS gev
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04777 | train |
v3 | Schema:
items (alias: ikob)(id, status, salary, type)
projects(type, level, id, salary)
Task: Find amount from items where salary exceeds the maximum value from projects for the same status.
SQL: | SELECT amount FROM items AS ikob
WHERE salary > (
SELECT MAX(value) FROM projects AS uliv
WHERE uliv.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04778 | train |
v3 | Schema:
sales (alias: cif)(level, salary, id, code)
regions(name, status, code, value)
Task: Find value from sales where value exceeds the maximum amount from regions for the same level.
SQL: | SELECT value FROM sales AS cif
WHERE value > (
SELECT MAX(amount) FROM regions AS okiv
WHERE okiv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04779 | train |
v3 | Schema:
schedules (alias: vmob)(salary, id, date, amount)
items(id, salary, status, level)
Task: Retrieve code from schedules with amount above the AVG(amount) of items rows sharing the same level.
SQL: | SELECT code FROM schedules AS vmob
WHERE amount > (
SELECT AVG(amount) FROM items AS ikob
WHERE ikob.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04780 | train |
v1 | Schema:
items (alias: ikob)(level, status, value, type)
schedules(status, date, value, id)
Task: Find code from items where code appears in schedules entries with matching level.
SQL: | SELECT code FROM items AS ikob
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04781 | train |
v2 | Schema:
accounts (alias: jac)(code, salary, value, status)
sales(value, status, level, code)
Task: Find name from accounts where a matching record exists in sales with the same id.
SQL: | SELECT name FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04782 | train |
v2 | Schema:
items (alias: ikob)(value, date, id, name)
categories(value, level, name, amount)
Task: Find id from items where a matching record exists in categories with the same level.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "ikob",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04783 | train |
v3 | Schema:
departments (alias: dov)(value, date, code, name)
managers(date, amount, name, id)
Task: Retrieve name from departments with amount above the MIN(value) of managers rows sharing the same id.
SQL: | SELECT name FROM departments AS dov
WHERE amount > (
SELECT MIN(value) FROM managers AS hac
WHERE hac.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04784 | train |
v1 | Schema:
managers (alias: hac)(id, salary, date, type)
accounts(status, type, id, value)
Task: Select salary from managers where type exists in accounts for the same level.
SQL: | SELECT salary FROM managers AS hac
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "accounts",
"outer_alias": "hac",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04785 | train |
v1 | Schema:
projects (alias: uliv)(code, value, date, amount)
items(salary, status, type, value)
Task: Find value from projects where id appears in items entries with matching status.
SQL: | SELECT value FROM projects AS uliv
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04786 | train |
v3 | Schema:
accounts (alias: jac)(type, level, status, amount)
orders(level, amount, id, date)
Task: Find id from accounts where amount exceeds the maximum salary from orders for the same level.
SQL: | SELECT id FROM accounts AS jac
WHERE amount > (
SELECT MAX(salary) FROM orders AS kab
WHERE kab.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04787 | train |
v3 | Schema:
requests (alias: ejof)(name, level, value, status)
employees(name, salary, value, status)
Task: Find id from requests where amount exceeds the total salary from employees for the same id.
SQL: | SELECT id FROM requests AS ejof
WHERE amount > (
SELECT SUM(salary) FROM employees AS bev
WHERE bev.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04788 | train |
v2 | Schema:
requests (alias: ejof)(code, level, amount, id)
employees(name, amount, status, value)
Task: Find salary from requests where a matching record exists in employees with the same id.
SQL: | SELECT salary FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04789 | train |
v3 | Schema:
items (alias: ikob)(value, amount, type, id)
requests(id, code, salary, name)
Task: Find amount from items where amount exceeds the average value from requests for the same type.
SQL: | SELECT amount FROM items AS ikob
WHERE amount > (
SELECT AVG(value) FROM requests AS ejof
WHERE ejof.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04790 | train |
v2 | Schema:
branches (alias: agov)(value, name, salary, status)
employees(status, type, level, name)
Task: Retrieve amount from branches that have at least one corresponding entry in employees sharing the same status.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04791 | train |
v3 | Schema:
sales (alias: cif)(id, level, date, amount)
regions(type, code, amount, date)
Task: Retrieve id from sales with value above the MIN(value) of regions rows sharing the same code.
SQL: | SELECT id FROM sales AS cif
WHERE value > (
SELECT MIN(value) FROM regions AS okiv
WHERE okiv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04792 | train |
v3 | Schema:
transactions (alias: gev)(date, code, amount, level)
regions(level, id, type, amount)
Task: Retrieve salary from transactions with amount above the SUM(amount) of regions rows sharing the same level.
SQL: | SELECT salary FROM transactions AS gev
WHERE amount > (
SELECT SUM(amount) FROM regions AS okiv
WHERE okiv.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04793 | train |
v2 | Schema:
customers (alias: lex)(salary, level, id, status)
managers(code, id, level, type)
Task: Retrieve id from customers that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04794 | train |
v2 | Schema:
products (alias: nad)(date, type, value, status)
sales(amount, salary, name, id)
Task: Retrieve amount from products that have at least one corresponding entry in sales sharing the same code.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = nad.code
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04795 | train |
v3 | Schema:
invoices (alias: fal)(name, date, level, type)
orders(code, status, salary, date)
Task: Find amount from invoices where value exceeds the average value from orders for the same code.
SQL: | SELECT amount FROM invoices AS fal
WHERE value > (
SELECT AVG(value) FROM orders AS kab
WHERE kab.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04796 | train |
v1 | Schema:
employees (alias: bev)(value, status, amount, type)
requests(value, name, level, salary)
Task: Find salary from employees where id appears in requests entries with matching status.
SQL: | SELECT salary FROM employees AS bev
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "requests",
"outer_alias": "bev",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04797 | train |
v3 | Schema:
sales (alias: cif)(id, code, level, name)
managers(amount, date, id, status)
Task: Retrieve amount from sales with salary above the MAX(amount) of managers rows sharing the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE salary > (
SELECT MAX(amount) FROM managers AS hac
WHERE hac.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04798 | train |
v3 | Schema:
customers (alias: lex)(code, amount, id, type)
sales(date, code, salary, value)
Task: Retrieve salary from customers with value above the AVG(salary) of sales rows sharing the same status.
SQL: | SELECT salary FROM customers AS lex
WHERE value > (
SELECT AVG(salary) FROM sales AS cif
WHERE cif.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04799 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.