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 |
|---|---|---|---|---|---|---|
v1 | Schema:
branches (alias: agov)(name, status, value, date)
transactions(code, date, amount, level)
Task: Find value from branches where type appears in transactions entries with matching status.
SQL: | SELECT value FROM branches AS agov
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04500 | train |
v1 | Schema:
employees (alias: bev)(amount, level, value, type)
items(code, level, value, status)
Task: Retrieve code from employees whose id is found in items rows where level matches the outer record.
SQL: | SELECT code FROM employees AS bev
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "items",
"outer_alias": "bev",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04501 | train |
v1 | Schema:
staff (alias: xnob)(value, amount, salary, id)
categories(value, status, name, id)
Task: Select value from staff where code exists in categories for the same level.
SQL: | SELECT value FROM staff AS xnob
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04502 | train |
v3 | Schema:
sales (alias: cif)(date, level, amount, type)
employees(amount, status, id, name)
Task: Retrieve amount from sales with value above the MAX(value) of employees rows sharing the same id.
SQL: | SELECT amount FROM sales AS cif
WHERE value > (
SELECT MAX(value) FROM employees AS bev
WHERE bev.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04503 | train |
v3 | Schema:
departments (alias: dov)(level, date, id, type)
regions(amount, value, salary, name)
Task: Find value from departments where salary exceeds the count of amount from regions for the same status.
SQL: | SELECT value FROM departments AS dov
WHERE salary > (
SELECT COUNT(amount) FROM regions AS okiv
WHERE okiv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04504 | train |
v2 | Schema:
products (alias: nad)(name, value, id, amount)
staff(name, amount, id, status)
Task: Find code from products where a matching record exists in staff with the same id.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = nad.id
); | {
"outer_table": "products",
"inner_table": "staff",
"outer_alias": "nad",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04505 | train |
v1 | Schema:
branches (alias: agov)(salary, status, name, date)
items(code, salary, type, amount)
Task: Find name from branches where code appears in items entries with matching code.
SQL: | SELECT name FROM branches AS agov
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04506 | train |
v1 | Schema:
regions (alias: okiv)(id, code, type, level)
projects(date, value, id, status)
Task: Select salary from regions where id exists in projects for the same status.
SQL: | SELECT salary FROM regions AS okiv
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04507 | train |
v3 | Schema:
projects (alias: uliv)(id, type, salary, value)
categories(amount, code, value, id)
Task: Retrieve id from projects with value above the MAX(salary) of categories rows sharing the same level.
SQL: | SELECT id FROM projects AS uliv
WHERE value > (
SELECT MAX(salary) FROM categories AS egiv
WHERE egiv.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "categories",
"outer_alias": "uliv",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04508 | train |
v1 | Schema:
staff (alias: xnob)(status, date, amount, code)
invoices(value, status, date, salary)
Task: Find amount from staff where code appears in invoices entries with matching type.
SQL: | SELECT amount FROM staff AS xnob
WHERE code IN (
SELECT code FROM invoices AS fal
WHERE fal.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "invoices",
"outer_alias": "xnob",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04509 | train |
v3 | Schema:
departments (alias: dov)(name, salary, value, id)
transactions(code, type, level, amount)
Task: Find name from departments where value exceeds the total amount from transactions for the same id.
SQL: | SELECT name FROM departments AS dov
WHERE value > (
SELECT SUM(amount) FROM transactions AS gev
WHERE gev.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04510 | train |
v3 | Schema:
invoices (alias: fal)(name, date, id, status)
shipments(value, salary, type, level)
Task: Find amount from invoices where amount exceeds the average value from shipments for the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE amount > (
SELECT AVG(value) FROM shipments AS vnob
WHERE vnob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04511 | train |
v2 | Schema:
transactions (alias: gev)(type, amount, value, name)
schedules(name, code, level, date)
Task: Retrieve salary from transactions that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04512 | train |
v3 | Schema:
employees (alias: bev)(id, type, amount, date)
managers(code, status, level, amount)
Task: Retrieve name from employees with salary above the SUM(amount) of managers rows sharing the same level.
SQL: | SELECT name FROM employees AS bev
WHERE salary > (
SELECT SUM(amount) FROM managers AS hac
WHERE hac.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "bev",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04513 | train |
v1 | Schema:
tasks (alias: znob)(code, status, value, salary)
shipments(amount, date, value, id)
Task: Select salary from tasks where type exists in shipments for the same id.
SQL: | SELECT salary FROM tasks AS znob
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "shipments",
"outer_alias": "znob",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04514 | train |
v2 | Schema:
projects (alias: uliv)(salary, status, date, code)
staff(amount, code, id, status)
Task: Retrieve value from projects that have at least one corresponding entry in staff sharing the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04515 | train |
v2 | Schema:
branches (alias: agov)(name, status, date, salary)
tasks(amount, salary, name, date)
Task: Retrieve id from branches that have at least one corresponding entry in tasks sharing the same type.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "tasks",
"outer_alias": "agov",
"inner_alias": "znob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04516 | train |
v2 | Schema:
shipments (alias: vnob)(code, name, salary, amount)
customers(type, name, id, date)
Task: Retrieve id from shipments that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04517 | train |
v2 | Schema:
items (alias: ikob)(date, salary, level, type)
staff(type, name, amount, date)
Task: Retrieve amount from items that have at least one corresponding entry in staff sharing the same id.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04518 | train |
v1 | Schema:
requests (alias: ejof)(type, status, code, level)
regions(level, id, code, status)
Task: Select code from requests where type exists in regions for the same type.
SQL: | SELECT code FROM requests AS ejof
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04519 | train |
v1 | Schema:
sales (alias: cif)(amount, type, name, code)
products(code, id, type, date)
Task: Find value from sales where type appears in products entries with matching status.
SQL: | SELECT value FROM sales AS cif
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "products",
"outer_alias": "cif",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04520 | train |
v2 | Schema:
customers (alias: lex)(status, date, amount, level)
schedules(salary, id, date, name)
Task: Find id from customers where a matching record exists in schedules with the same type.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04521 | train |
v1 | Schema:
regions (alias: okiv)(level, status, amount, salary)
categories(value, name, level, salary)
Task: Select code from regions where level exists in categories for the same status.
SQL: | SELECT code FROM regions AS okiv
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04522 | train |
v3 | Schema:
departments (alias: dov)(amount, code, name, salary)
items(type, amount, salary, value)
Task: Retrieve code from departments with value above the AVG(salary) of items rows sharing the same level.
SQL: | SELECT code FROM departments AS dov
WHERE value > (
SELECT AVG(salary) FROM items AS ikob
WHERE ikob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "items",
"outer_alias": "dov",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04523 | train |
v1 | Schema:
customers (alias: lex)(amount, type, status, name)
transactions(date, value, name, level)
Task: Select amount from customers where id exists in transactions for the same status.
SQL: | SELECT amount FROM customers AS lex
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "transactions",
"outer_alias": "lex",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04524 | train |
v2 | Schema:
shipments (alias: vnob)(value, level, amount, date)
invoices(amount, salary, id, value)
Task: Retrieve salary from shipments that have at least one corresponding entry in invoices sharing the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "invoices",
"outer_alias": "vnob",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04525 | train |
v1 | Schema:
shipments (alias: vnob)(value, name, id, status)
sales(name, salary, level, value)
Task: Select code from shipments where code exists in sales for the same id.
SQL: | SELECT code FROM shipments AS vnob
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04526 | train |
v1 | Schema:
accounts (alias: jac)(salary, code, status, id)
customers(status, code, type, level)
Task: Find code from accounts where type appears in customers entries with matching code.
SQL: | SELECT code FROM accounts AS jac
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04527 | train |
v1 | Schema:
shipments (alias: vnob)(status, code, id, type)
sales(level, date, status, salary)
Task: Find salary from shipments where type appears in sales entries with matching id.
SQL: | SELECT salary FROM shipments AS vnob
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04528 | train |
v3 | Schema:
departments (alias: dov)(date, salary, type, level)
customers(status, value, code, amount)
Task: Find value from departments where salary exceeds the count of salary from customers for the same level.
SQL: | SELECT value FROM departments AS dov
WHERE salary > (
SELECT COUNT(salary) FROM customers AS lex
WHERE lex.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04529 | train |
v1 | Schema:
managers (alias: hac)(name, type, salary, code)
requests(id, value, salary, amount)
Task: Retrieve id from managers whose level is found in requests rows where id matches the outer record.
SQL: | SELECT id FROM managers AS hac
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "hac",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04530 | train |
v1 | Schema:
items (alias: ikob)(date, id, type, amount)
tasks(salary, id, value, level)
Task: Select code from items where level exists in tasks for the same code.
SQL: | SELECT code FROM items AS ikob
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04531 | train |
v3 | Schema:
shipments (alias: vnob)(amount, type, status, salary)
tasks(status, level, salary, amount)
Task: Retrieve value from shipments with value above the MIN(salary) of tasks rows sharing the same type.
SQL: | SELECT value FROM shipments AS vnob
WHERE value > (
SELECT MIN(salary) FROM tasks AS znob
WHERE znob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "tasks",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04532 | train |
v2 | Schema:
staff (alias: xnob)(level, name, value, date)
tasks(type, date, value, amount)
Task: Find salary from staff where a matching record exists in tasks with the same status.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04533 | train |
v1 | Schema:
accounts (alias: jac)(amount, name, value, type)
staff(code, value, date, salary)
Task: Find name from accounts where id appears in staff entries with matching type.
SQL: | SELECT name FROM accounts AS jac
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04534 | train |
v3 | Schema:
customers (alias: lex)(date, salary, status, id)
departments(type, date, status, amount)
Task: Retrieve amount from customers with value above the SUM(salary) of departments rows sharing the same type.
SQL: | SELECT amount FROM customers AS lex
WHERE value > (
SELECT SUM(salary) FROM departments AS dov
WHERE dov.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "departments",
"outer_alias": "lex",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04535 | train |
v3 | Schema:
sales (alias: cif)(salary, level, amount, id)
departments(status, name, code, salary)
Task: Find id from sales where value exceeds the minimum value from departments for the same status.
SQL: | SELECT id FROM sales AS cif
WHERE value > (
SELECT MIN(value) FROM departments AS dov
WHERE dov.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "cif",
"inner_alias": "dov",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04536 | train |
v1 | Schema:
branches (alias: agov)(value, type, level, status)
staff(salary, amount, level, status)
Task: Retrieve code from branches whose id is found in staff rows where level matches the outer record.
SQL: | SELECT code FROM branches AS agov
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "staff",
"outer_alias": "agov",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04537 | train |
v3 | Schema:
transactions (alias: gev)(name, date, code, id)
employees(salary, value, id, level)
Task: Retrieve amount from transactions with salary above the MIN(amount) of employees rows sharing the same level.
SQL: | SELECT amount FROM transactions AS gev
WHERE salary > (
SELECT MIN(amount) FROM employees AS bev
WHERE bev.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "employees",
"outer_alias": "gev",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04538 | train |
v1 | Schema:
sales (alias: cif)(salary, id, value, code)
categories(status, id, level, amount)
Task: Select salary from sales where status exists in categories for the same type.
SQL: | SELECT salary FROM sales AS cif
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04539 | train |
v2 | Schema:
sales (alias: cif)(type, date, level, status)
invoices(date, value, salary, id)
Task: Find salary from sales where a matching record exists in invoices with the same id.
SQL: | SELECT salary FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "invoices",
"outer_alias": "cif",
"inner_alias": "fal",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04540 | train |
v2 | Schema:
items (alias: ikob)(code, id, name, value)
accounts(amount, type, salary, date)
Task: Find amount from items where a matching record exists in accounts with the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04541 | train |
v2 | Schema:
tasks (alias: znob)(amount, date, code, value)
invoices(level, value, id, amount)
Task: Find code from tasks where a matching record exists in invoices with the same code.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04542 | train |
v1 | Schema:
requests (alias: ejof)(type, salary, amount, code)
orders(amount, value, code, salary)
Task: Find name from requests where code appears in orders entries with matching type.
SQL: | SELECT name FROM requests AS ejof
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04543 | train |
v1 | Schema:
customers (alias: lex)(id, amount, name, status)
departments(code, salary, date, name)
Task: Find code from customers where status appears in departments entries with matching id.
SQL: | SELECT code FROM customers AS lex
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "departments",
"outer_alias": "lex",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04544 | train |
v2 | Schema:
departments (alias: dov)(type, amount, level, date)
managers(status, date, amount, name)
Task: Find code from departments where a matching record exists in managers with the same id.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "managers",
"outer_alias": "dov",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04545 | train |
v3 | Schema:
invoices (alias: fal)(level, salary, id, code)
orders(id, salary, name, date)
Task: Find code from invoices where value exceeds the total amount from orders for the same type.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT SUM(amount) FROM orders AS kab
WHERE kab.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04546 | train |
v1 | Schema:
staff (alias: xnob)(date, value, name, salary)
employees(value, id, date, level)
Task: Retrieve code from staff whose id is found in employees rows where type matches the outer record.
SQL: | SELECT code FROM staff AS xnob
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04547 | train |
v1 | Schema:
products (alias: nad)(value, date, name, status)
employees(level, code, amount, id)
Task: Select amount from products where status exists in employees for the same code.
SQL: | SELECT amount FROM products AS nad
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.code = nad.code
); | {
"outer_table": "products",
"inner_table": "employees",
"outer_alias": "nad",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04548 | train |
v1 | Schema:
employees (alias: bev)(amount, type, status, name)
invoices(id, date, type, salary)
Task: Retrieve id from employees whose id is found in invoices rows where status matches the outer record.
SQL: | SELECT id FROM employees AS bev
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "invoices",
"outer_alias": "bev",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04549 | train |
v1 | Schema:
items (alias: ikob)(level, type, amount, name)
tasks(status, amount, level, name)
Task: Retrieve code from items whose id is found in tasks rows where id matches the outer record.
SQL: | SELECT code FROM items AS ikob
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "tasks",
"outer_alias": "ikob",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04550 | train |
v2 | Schema:
products (alias: nad)(name, level, amount, date)
employees(id, amount, code, name)
Task: Retrieve code from products that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = nad.code
); | {
"outer_table": "products",
"inner_table": "employees",
"outer_alias": "nad",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04551 | train |
v3 | Schema:
schedules (alias: vmob)(code, name, amount, level)
regions(date, amount, value, code)
Task: Find value from schedules where salary exceeds the average amount from regions for the same type.
SQL: | SELECT value FROM schedules AS vmob
WHERE salary > (
SELECT AVG(amount) FROM regions AS okiv
WHERE okiv.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "regions",
"outer_alias": "vmob",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04552 | train |
v3 | Schema:
branches (alias: agov)(type, name, level, code)
categories(id, value, type, date)
Task: Retrieve value from branches with amount above the AVG(value) of categories rows sharing the same level.
SQL: | SELECT value FROM branches AS agov
WHERE amount > (
SELECT AVG(value) FROM categories AS egiv
WHERE egiv.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04553 | train |
v3 | Schema:
categories (alias: egiv)(value, name, id, date)
employees(name, date, amount, level)
Task: Retrieve name from categories with amount above the MIN(value) of employees rows sharing the same level.
SQL: | SELECT name FROM categories AS egiv
WHERE amount > (
SELECT MIN(value) FROM employees AS bev
WHERE bev.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04554 | train |
v2 | Schema:
transactions (alias: gev)(date, salary, status, code)
requests(amount, value, id, date)
Task: Retrieve code from transactions that have at least one corresponding entry in requests sharing the same status.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04555 | train |
v3 | Schema:
managers (alias: hac)(code, type, salary, value)
customers(level, name, value, amount)
Task: Find amount from managers where value exceeds the count of salary from customers for the same level.
SQL: | SELECT amount FROM managers AS hac
WHERE value > (
SELECT COUNT(salary) FROM customers AS lex
WHERE lex.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04556 | train |
v1 | Schema:
projects (alias: uliv)(type, salary, level, name)
requests(level, code, amount, type)
Task: Select salary from projects where status exists in requests for the same level.
SQL: | SELECT salary FROM projects AS uliv
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "uliv",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04557 | train |
v2 | Schema:
invoices (alias: fal)(type, salary, id, date)
requests(date, level, status, id)
Task: Retrieve value from invoices that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "requests",
"outer_alias": "fal",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04558 | train |
v2 | Schema:
schedules (alias: vmob)(type, name, id, status)
employees(code, salary, type, level)
Task: Find salary from schedules where a matching record exists in employees with the same type.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "employees",
"outer_alias": "vmob",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04559 | train |
v1 | Schema:
requests (alias: ejof)(name, type, salary, code)
managers(value, date, name, salary)
Task: Retrieve salary from requests whose status is found in managers rows where id matches the outer record.
SQL: | SELECT salary FROM requests AS ejof
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04560 | train |
v3 | Schema:
managers (alias: hac)(status, amount, date, value)
transactions(type, value, status, id)
Task: Find amount from managers where salary exceeds the minimum salary from transactions for the same status.
SQL: | SELECT amount FROM managers AS hac
WHERE salary > (
SELECT MIN(salary) FROM transactions AS gev
WHERE gev.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04561 | train |
v1 | Schema:
categories (alias: egiv)(id, status, code, level)
projects(code, name, type, value)
Task: Retrieve id from categories whose level is found in projects rows where type matches the outer record.
SQL: | SELECT id FROM categories AS egiv
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04562 | train |
v1 | Schema:
shipments (alias: vnob)(status, date, amount, value)
tasks(name, value, amount, salary)
Task: Find name from shipments where level appears in tasks entries with matching code.
SQL: | SELECT name FROM shipments AS vnob
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "tasks",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04563 | train |
v1 | Schema:
sales (alias: cif)(level, type, date, status)
schedules(status, name, amount, date)
Task: Retrieve salary from sales whose level is found in schedules rows where code matches the outer record.
SQL: | SELECT salary FROM sales AS cif
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04564 | train |
v3 | Schema:
regions (alias: okiv)(type, level, id, status)
items(amount, status, value, id)
Task: Retrieve salary from regions with salary above the MIN(salary) of items rows sharing the same level.
SQL: | SELECT salary FROM regions AS okiv
WHERE salary > (
SELECT MIN(salary) FROM items AS ikob
WHERE ikob.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04565 | train |
v1 | Schema:
projects (alias: uliv)(level, date, type, status)
sales(level, salary, date, id)
Task: Select value from projects where id exists in sales for the same id.
SQL: | SELECT value FROM projects AS uliv
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04566 | train |
v3 | Schema:
transactions (alias: gev)(name, id, status, amount)
projects(date, code, type, id)
Task: Find salary from transactions where value exceeds the count of value from projects for the same status.
SQL: | SELECT salary FROM transactions AS gev
WHERE value > (
SELECT COUNT(value) FROM projects AS uliv
WHERE uliv.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04567 | train |
v3 | Schema:
projects (alias: uliv)(date, id, salary, type)
branches(value, salary, status, id)
Task: Retrieve name from projects with salary above the MIN(amount) of branches rows sharing the same type.
SQL: | SELECT name FROM projects AS uliv
WHERE salary > (
SELECT MIN(amount) FROM branches AS agov
WHERE agov.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "branches",
"outer_alias": "uliv",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04568 | train |
v1 | Schema:
products (alias: nad)(name, amount, id, value)
departments(name, salary, code, amount)
Task: Select name from products where level exists in departments for the same level.
SQL: | SELECT name FROM products AS nad
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.level = nad.level
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04569 | train |
v1 | Schema:
branches (alias: agov)(salary, date, level, id)
sales(code, status, name, type)
Task: Find amount from branches where type appears in sales entries with matching level.
SQL: | SELECT amount FROM branches AS agov
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "sales",
"outer_alias": "agov",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04570 | train |
v2 | Schema:
invoices (alias: fal)(code, id, date, status)
transactions(date, level, amount, type)
Task: Find salary from invoices where a matching record exists in transactions with the same level.
SQL: | SELECT salary FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04571 | train |
v1 | Schema:
customers (alias: lex)(id, level, date, code)
schedules(level, amount, status, type)
Task: Retrieve salary from customers whose level is found in schedules rows where code matches the outer record.
SQL: | SELECT salary FROM customers AS lex
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04572 | train |
v1 | Schema:
tasks (alias: znob)(date, salary, type, amount)
employees(name, type, level, amount)
Task: Select name from tasks where code exists in employees for the same id.
SQL: | SELECT name FROM tasks AS znob
WHERE code IN (
SELECT code FROM employees AS bev
WHERE bev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04573 | train |
v2 | Schema:
categories (alias: egiv)(code, name, status, level)
employees(value, level, name, code)
Task: Find salary from categories where a matching record exists in employees with the same level.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04574 | train |
v2 | Schema:
transactions (alias: gev)(date, salary, level, amount)
tasks(name, level, salary, id)
Task: Find value from transactions where a matching record exists in tasks with the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04575 | train |
v1 | Schema:
transactions (alias: gev)(status, id, type, salary)
items(status, code, id, salary)
Task: Retrieve salary from transactions whose code is found in items rows where level matches the outer record.
SQL: | SELECT salary FROM transactions AS gev
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04576 | train |
v2 | Schema:
tasks (alias: znob)(status, level, salary, name)
items(date, name, value, level)
Task: Retrieve amount from tasks that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT amount FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "items",
"outer_alias": "znob",
"inner_alias": "ikob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04577 | train |
v3 | Schema:
regions (alias: okiv)(name, level, date, salary)
departments(id, salary, type, date)
Task: Find name from regions where value exceeds the minimum salary from departments for the same level.
SQL: | SELECT name FROM regions AS okiv
WHERE value > (
SELECT MIN(salary) FROM departments AS dov
WHERE dov.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04578 | train |
v1 | Schema:
departments (alias: dov)(name, amount, status, id)
tasks(id, amount, code, type)
Task: Find code from departments where id appears in tasks entries with matching level.
SQL: | SELECT code FROM departments AS dov
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04579 | train |
v1 | Schema:
tasks (alias: znob)(date, type, amount, level)
categories(code, value, level, date)
Task: Select name from tasks where level exists in categories for the same id.
SQL: | SELECT name FROM tasks AS znob
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04580 | train |
v3 | Schema:
items (alias: ikob)(id, level, type, date)
requests(status, level, date, salary)
Task: Find code from items where amount exceeds the count of salary from requests for the same code.
SQL: | SELECT code FROM items AS ikob
WHERE amount > (
SELECT COUNT(salary) FROM requests AS ejof
WHERE ejof.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "requests",
"outer_alias": "ikob",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04581 | train |
v2 | Schema:
branches (alias: agov)(type, salary, level, amount)
products(level, date, value, status)
Task: Find code from branches where a matching record exists in products with the same id.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04582 | train |
v1 | Schema:
transactions (alias: gev)(value, name, salary, id)
staff(amount, salary, code, date)
Task: Retrieve salary from transactions whose id is found in staff rows where status matches the outer record.
SQL: | SELECT salary FROM transactions AS gev
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04583 | train |
v3 | Schema:
sales (alias: cif)(salary, id, level, value)
staff(name, amount, value, date)
Task: Retrieve code from sales with salary above the AVG(amount) of staff rows sharing the same code.
SQL: | SELECT code FROM sales AS cif
WHERE salary > (
SELECT AVG(amount) FROM staff AS xnob
WHERE xnob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04584 | train |
v3 | Schema:
requests (alias: ejof)(code, name, date, salary)
branches(type, salary, value, code)
Task: Retrieve name from requests with salary above the SUM(value) of branches rows sharing the same status.
SQL: | SELECT name FROM requests AS ejof
WHERE salary > (
SELECT SUM(value) FROM branches AS agov
WHERE agov.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04585 | train |
v1 | Schema:
employees (alias: bev)(id, code, salary, amount)
tasks(salary, type, amount, code)
Task: Retrieve salary from employees whose level is found in tasks rows where level matches the outer record.
SQL: | SELECT salary FROM employees AS bev
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "tasks",
"outer_alias": "bev",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04586 | train |
v1 | Schema:
customers (alias: lex)(amount, value, level, id)
projects(amount, date, id, type)
Task: Retrieve value from customers whose level is found in projects rows where type matches the outer record.
SQL: | SELECT value FROM customers AS lex
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04587 | train |
v1 | Schema:
regions (alias: okiv)(level, id, status, value)
orders(level, amount, id, value)
Task: Find id from regions where type appears in orders entries with matching level.
SQL: | SELECT id FROM regions AS okiv
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04588 | train |
v2 | Schema:
shipments (alias: vnob)(type, name, date, status)
sales(level, code, id, value)
Task: Find amount from shipments where a matching record exists in sales with the same status.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04589 | train |
v2 | Schema:
customers (alias: lex)(level, amount, name, code)
accounts(status, id, level, value)
Task: Retrieve value from customers that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04590 | train |
v3 | Schema:
departments (alias: dov)(salary, date, level, name)
sales(status, value, level, type)
Task: Retrieve salary from departments with value above the AVG(amount) of sales rows sharing the same level.
SQL: | SELECT salary FROM departments AS dov
WHERE value > (
SELECT AVG(amount) FROM sales AS cif
WHERE cif.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04591 | train |
v3 | Schema:
items (alias: ikob)(amount, name, level, id)
customers(name, type, date, salary)
Task: Retrieve id from items with salary above the SUM(amount) of customers rows sharing the same code.
SQL: | SELECT id FROM items AS ikob
WHERE salary > (
SELECT SUM(amount) FROM customers AS lex
WHERE lex.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04592 | train |
v3 | Schema:
categories (alias: egiv)(name, date, value, salary)
accounts(value, type, date, status)
Task: Retrieve id from categories with amount above the SUM(amount) of accounts rows sharing the same level.
SQL: | SELECT id FROM categories AS egiv
WHERE amount > (
SELECT SUM(amount) FROM accounts AS jac
WHERE jac.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04593 | train |
v1 | Schema:
customers (alias: lex)(type, date, id, status)
regions(value, name, date, salary)
Task: Select salary from customers where id exists in regions for the same type.
SQL: | SELECT salary FROM customers AS lex
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04594 | train |
v1 | Schema:
transactions (alias: gev)(name, code, type, status)
departments(date, amount, status, code)
Task: Retrieve code from transactions whose code is found in departments rows where level matches the outer record.
SQL: | SELECT code FROM transactions AS gev
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04595 | train |
v1 | Schema:
items (alias: ikob)(name, code, date, type)
categories(level, status, id, salary)
Task: Retrieve name from items whose status is found in categories rows where level matches the outer record.
SQL: | SELECT name FROM items AS ikob
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "ikob",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04596 | train |
v1 | Schema:
regions (alias: okiv)(amount, salary, status, date)
products(id, value, level, salary)
Task: Retrieve code from regions whose code is found in products rows where id matches the outer record.
SQL: | SELECT code FROM regions AS okiv
WHERE code IN (
SELECT code FROM products AS nad
WHERE nad.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04597 | train |
v1 | Schema:
requests (alias: ejof)(id, level, type, value)
invoices(value, id, code, amount)
Task: Select value from requests where status exists in invoices for the same level.
SQL: | SELECT value FROM requests AS ejof
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04598 | train |
v3 | Schema:
staff (alias: xnob)(id, date, code, value)
tasks(salary, value, date, code)
Task: Find code from staff where value exceeds the maximum amount from tasks for the same type.
SQL: | SELECT code FROM staff AS xnob
WHERE value > (
SELECT MAX(amount) FROM tasks AS znob
WHERE znob.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04599 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.