variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v2 | Schema:
employees (alias: bev)(amount, salary, value, status)
departments(amount, id, type, name)
Task: Retrieve salary from employees that have at least one corresponding entry in departments sharing the same type.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05000 | train |
v1 | Schema:
transactions (alias: gev)(code, date, amount, id)
departments(type, value, salary, id)
Task: Find name from transactions where type appears in departments entries with matching status.
SQL: | SELECT name FROM transactions AS gev
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05001 | train |
v3 | Schema:
projects (alias: uliv)(level, amount, code, status)
branches(status, level, type, id)
Task: Find code from projects where salary exceeds the minimum amount from branches for the same type.
SQL: | SELECT code 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": "code",
"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_05002 | train |
v2 | Schema:
customers (alias: lex)(level, id, amount, type)
schedules(value, name, id, amount)
Task: Retrieve code from customers that have at least one corresponding entry in schedules sharing the same level.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "schedules",
"outer_alias": "lex",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05003 | train |
v1 | Schema:
shipments (alias: vnob)(id, salary, value, name)
branches(name, date, id, amount)
Task: Retrieve value from shipments whose type is found in branches rows where id matches the outer record.
SQL: | SELECT value FROM shipments AS vnob
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "branches",
"outer_alias": "vnob",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05004 | train |
v1 | Schema:
invoices (alias: fal)(id, level, type, value)
sales(name, date, salary, amount)
Task: Select id from invoices where status exists in sales for the same type.
SQL: | SELECT id FROM invoices AS fal
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05005 | train |
v3 | Schema:
tasks (alias: znob)(name, code, amount, type)
transactions(value, name, amount, id)
Task: Find id from tasks where value exceeds the maximum salary from transactions for the same id.
SQL: | SELECT id FROM tasks AS znob
WHERE value > (
SELECT MAX(salary) FROM transactions AS gev
WHERE gev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05006 | train |
v3 | Schema:
invoices (alias: fal)(salary, code, name, value)
regions(level, type, status, value)
Task: Find id from invoices where salary exceeds the average salary from regions for the same code.
SQL: | SELECT id FROM invoices AS fal
WHERE salary > (
SELECT AVG(salary) FROM regions AS okiv
WHERE okiv.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "regions",
"outer_alias": "fal",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05007 | train |
v1 | Schema:
items (alias: ikob)(salary, status, level, code)
categories(amount, id, value, type)
Task: Retrieve code from items whose code is found in categories rows where level matches the outer record.
SQL: | SELECT code FROM items AS ikob
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "categories",
"outer_alias": "ikob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05008 | train |
v2 | Schema:
products (alias: nad)(date, salary, id, name)
schedules(type, code, level, salary)
Task: Find value from products where a matching record exists in schedules with the same level.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05009 | train |
v2 | Schema:
regions (alias: okiv)(type, status, level, date)
categories(id, status, code, type)
Task: Find salary from regions where a matching record exists in categories with the same level.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05010 | train |
v2 | Schema:
products (alias: nad)(type, value, status, id)
branches(level, name, status, type)
Task: Find code from products where a matching record exists in branches with the same code.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = nad.code
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05011 | train |
v3 | Schema:
shipments (alias: vnob)(value, salary, status, code)
accounts(code, type, level, salary)
Task: Find value from shipments where amount exceeds the total amount from accounts for the same id.
SQL: | SELECT value FROM shipments AS vnob
WHERE amount > (
SELECT SUM(amount) FROM accounts AS jac
WHERE jac.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05012 | train |
v1 | Schema:
invoices (alias: fal)(code, date, amount, type)
transactions(type, level, amount, name)
Task: Select salary from invoices where status exists in transactions for the same level.
SQL: | SELECT salary FROM invoices AS fal
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05013 | train |
v1 | Schema:
departments (alias: dov)(code, name, amount, value)
tasks(level, amount, value, code)
Task: Find salary from departments where id appears in tasks entries with matching level.
SQL: | SELECT salary 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": "salary",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05014 | train |
v3 | Schema:
accounts (alias: jac)(code, name, id, level)
schedules(value, status, amount, date)
Task: Find salary from accounts where salary exceeds the minimum value from schedules for the same status.
SQL: | SELECT salary FROM accounts AS jac
WHERE salary > (
SELECT MIN(value) FROM schedules AS vmob
WHERE vmob.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "schedules",
"outer_alias": "jac",
"inner_alias": "vmob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05015 | train |
v3 | Schema:
staff (alias: xnob)(value, level, code, salary)
regions(date, level, status, amount)
Task: Retrieve code from staff with salary above the COUNT(salary) of regions rows sharing the same level.
SQL: | SELECT code FROM staff AS xnob
WHERE salary > (
SELECT COUNT(salary) FROM regions AS okiv
WHERE okiv.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05016 | train |
v3 | Schema:
tasks (alias: znob)(name, type, date, status)
shipments(type, date, value, salary)
Task: Retrieve code from tasks with salary above the MAX(salary) of shipments rows sharing the same level.
SQL: | SELECT code FROM tasks AS znob
WHERE salary > (
SELECT MAX(salary) FROM shipments AS vnob
WHERE vnob.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "shipments",
"outer_alias": "znob",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05017 | train |
v3 | Schema:
schedules (alias: vmob)(salary, name, amount, code)
invoices(code, amount, id, status)
Task: Retrieve salary from schedules with salary above the AVG(amount) of invoices rows sharing the same type.
SQL: | SELECT salary FROM schedules AS vmob
WHERE salary > (
SELECT AVG(amount) FROM invoices AS fal
WHERE fal.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "invoices",
"outer_alias": "vmob",
"inner_alias": "fal",
"proj_col": "salary",
"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_05018 | train |
v2 | Schema:
sales (alias: cif)(type, amount, value, status)
staff(status, level, code, name)
Task: Find value from sales where a matching record exists in staff with the same id.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "staff",
"outer_alias": "cif",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05019 | train |
v1 | Schema:
orders (alias: kab)(code, status, level, value)
departments(date, status, amount, level)
Task: Select code from orders where code exists in departments for the same type.
SQL: | SELECT code FROM orders AS kab
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05020 | train |
v2 | Schema:
staff (alias: xnob)(name, amount, type, value)
sales(code, status, salary, name)
Task: Find salary from staff where a matching record exists in sales with the same type.
SQL: | SELECT salary FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "sales",
"outer_alias": "xnob",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05021 | train |
v3 | Schema:
invoices (alias: fal)(code, status, id, level)
accounts(code, name, value, amount)
Task: Retrieve amount from invoices with value above the SUM(amount) of accounts rows sharing the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE value > (
SELECT SUM(amount) FROM accounts AS jac
WHERE jac.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05022 | train |
v2 | Schema:
items (alias: ikob)(level, value, id, salary)
regions(amount, status, level, date)
Task: Find id from items where a matching record exists in regions with the same level.
SQL: | SELECT id FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "regions",
"outer_alias": "ikob",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05023 | train |
v2 | Schema:
transactions (alias: gev)(code, name, id, date)
branches(value, type, amount, date)
Task: Retrieve code from transactions that have at least one corresponding entry in branches sharing the same type.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "branches",
"outer_alias": "gev",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05024 | train |
v2 | Schema:
projects (alias: uliv)(type, name, level, amount)
sales(code, value, salary, name)
Task: Retrieve name from projects that have at least one corresponding entry in sales sharing the same status.
SQL: | SELECT name FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05025 | train |
v3 | Schema:
items (alias: ikob)(code, name, amount, date)
staff(type, code, date, status)
Task: Retrieve amount from items with salary above the MIN(amount) of staff rows sharing the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE salary > (
SELECT MIN(amount) FROM staff AS xnob
WHERE xnob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05026 | train |
v3 | Schema:
orders (alias: kab)(value, level, status, type)
departments(salary, type, level, name)
Task: Retrieve code from orders with salary above the MAX(amount) of departments rows sharing the same id.
SQL: | SELECT code FROM orders AS kab
WHERE salary > (
SELECT MAX(amount) FROM departments AS dov
WHERE dov.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05027 | train |
v3 | Schema:
shipments (alias: vnob)(id, date, value, level)
requests(amount, type, value, date)
Task: Find value from shipments where salary exceeds the maximum amount from requests for the same status.
SQL: | SELECT value FROM shipments AS vnob
WHERE salary > (
SELECT MAX(amount) FROM requests AS ejof
WHERE ejof.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05028 | train |
v3 | Schema:
requests (alias: ejof)(level, id, date, status)
invoices(amount, level, type, status)
Task: Retrieve id from requests with value above the COUNT(salary) of invoices rows sharing the same type.
SQL: | SELECT id FROM requests AS ejof
WHERE value > (
SELECT COUNT(salary) FROM invoices AS fal
WHERE fal.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "invoices",
"outer_alias": "ejof",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05029 | train |
v2 | Schema:
customers (alias: lex)(type, amount, name, code)
employees(value, id, salary, status)
Task: Find id from customers where a matching record exists in employees with the same code.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "employees",
"outer_alias": "lex",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05030 | train |
v3 | Schema:
orders (alias: kab)(id, status, value, type)
departments(salary, value, type, id)
Task: Find value from orders where value exceeds the minimum amount from departments for the same status.
SQL: | SELECT value FROM orders AS kab
WHERE value > (
SELECT MIN(amount) FROM departments AS dov
WHERE dov.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05031 | train |
v3 | Schema:
transactions (alias: gev)(value, amount, name, status)
products(id, value, level, status)
Task: Find value from transactions where value exceeds the maximum salary from products for the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE value > (
SELECT MAX(salary) FROM products AS nad
WHERE nad.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05032 | train |
v3 | Schema:
requests (alias: ejof)(id, level, status, salary)
staff(type, salary, status, date)
Task: Retrieve name from requests with value above the COUNT(value) of staff rows sharing the same code.
SQL: | SELECT name FROM requests AS ejof
WHERE value > (
SELECT COUNT(value) FROM staff AS xnob
WHERE xnob.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "staff",
"outer_alias": "ejof",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05033 | train |
v2 | Schema:
customers (alias: lex)(code, amount, type, salary)
invoices(date, level, name, value)
Task: Find name from customers where a matching record exists in invoices with the same code.
SQL: | SELECT name FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "invoices",
"outer_alias": "lex",
"inner_alias": "fal",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05034 | train |
v3 | Schema:
shipments (alias: vnob)(date, amount, value, code)
employees(level, value, code, salary)
Task: Retrieve code from shipments with amount above the MAX(amount) of employees rows sharing the same level.
SQL: | SELECT code FROM shipments AS vnob
WHERE amount > (
SELECT MAX(amount) FROM employees AS bev
WHERE bev.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05035 | train |
v1 | Schema:
orders (alias: kab)(id, name, salary, type)
sales(amount, salary, status, value)
Task: Retrieve salary from orders whose code is found in sales rows where code matches the outer record.
SQL: | SELECT salary FROM orders AS kab
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05036 | train |
v3 | Schema:
tasks (alias: znob)(status, code, date, amount)
branches(value, amount, name, salary)
Task: Find salary from tasks where value exceeds the total value from branches for the same type.
SQL: | SELECT salary FROM tasks AS znob
WHERE value > (
SELECT SUM(value) FROM branches AS agov
WHERE agov.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05037 | train |
v2 | Schema:
customers (alias: lex)(amount, value, code, type)
projects(status, date, code, type)
Task: Retrieve name from customers that have at least one corresponding entry in projects sharing the same level.
SQL: | SELECT name FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05038 | train |
v1 | Schema:
tasks (alias: znob)(name, type, status, id)
shipments(type, level, value, amount)
Task: Retrieve name from tasks whose code is found in shipments rows where code matches the outer record.
SQL: | SELECT name FROM tasks AS znob
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "shipments",
"outer_alias": "znob",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05039 | train |
v2 | Schema:
products (alias: nad)(id, salary, type, date)
schedules(type, salary, level, status)
Task: Retrieve amount from products that have at least one corresponding entry in schedules sharing the same type.
SQL: | SELECT amount 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": "amount",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05040 | train |
v3 | Schema:
accounts (alias: jac)(code, level, status, salary)
products(date, value, code, name)
Task: Find name from accounts where salary exceeds the count of value from products for the same type.
SQL: | SELECT name FROM accounts AS jac
WHERE salary > (
SELECT COUNT(value) FROM products AS nad
WHERE nad.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "products",
"outer_alias": "jac",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05041 | train |
v3 | Schema:
items (alias: ikob)(value, level, salary, amount)
invoices(date, code, value, status)
Task: Find name from items where amount exceeds the total salary from invoices for the same id.
SQL: | SELECT name FROM items AS ikob
WHERE amount > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "invoices",
"outer_alias": "ikob",
"inner_alias": "fal",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05042 | train |
v1 | Schema:
requests (alias: ejof)(level, date, amount, value)
branches(status, code, date, id)
Task: Find code from requests where level appears in branches entries with matching status.
SQL: | SELECT code FROM requests AS ejof
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05043 | train |
v3 | Schema:
sales (alias: cif)(salary, level, status, code)
schedules(type, value, status, id)
Task: Retrieve name from sales with amount above the SUM(salary) of schedules rows sharing the same code.
SQL: | SELECT name FROM sales AS cif
WHERE amount > (
SELECT SUM(salary) FROM schedules AS vmob
WHERE vmob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05044 | train |
v3 | Schema:
departments (alias: dov)(id, value, salary, level)
customers(name, code, status, level)
Task: Retrieve id from departments with value above the MAX(value) of customers rows sharing the same type.
SQL: | SELECT id FROM departments AS dov
WHERE value > (
SELECT MAX(value) FROM customers AS lex
WHERE lex.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05045 | train |
v3 | Schema:
transactions (alias: gev)(type, status, date, name)
products(salary, type, name, value)
Task: Retrieve id from transactions with amount above the MIN(value) of products rows sharing the same id.
SQL: | SELECT id FROM transactions AS gev
WHERE amount > (
SELECT MIN(value) FROM products AS nad
WHERE nad.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05046 | train |
v2 | Schema:
transactions (alias: gev)(amount, id, type, value)
projects(code, value, id, status)
Task: Find name from transactions where a matching record exists in projects with the same id.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05047 | train |
v2 | Schema:
staff (alias: xnob)(name, value, id, type)
managers(code, type, date, status)
Task: Retrieve code from staff that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05048 | train |
v3 | Schema:
departments (alias: dov)(value, id, name, type)
branches(salary, value, id, level)
Task: Retrieve salary from departments with amount above the COUNT(amount) of branches rows sharing the same id.
SQL: | SELECT salary FROM departments AS dov
WHERE amount > (
SELECT COUNT(amount) FROM branches AS agov
WHERE agov.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05049 | train |
v3 | Schema:
accounts (alias: jac)(date, salary, id, value)
shipments(level, salary, name, date)
Task: Retrieve value from accounts with salary above the MAX(salary) of shipments rows sharing the same type.
SQL: | SELECT value FROM accounts AS jac
WHERE salary > (
SELECT MAX(salary) FROM shipments AS vnob
WHERE vnob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05050 | train |
v1 | Schema:
requests (alias: ejof)(code, amount, id, type)
branches(salary, id, value, amount)
Task: Select value from requests where type exists in branches for the same level.
SQL: | SELECT value FROM requests AS ejof
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05051 | train |
v3 | Schema:
shipments (alias: vnob)(status, code, level, amount)
regions(code, name, amount, type)
Task: Find name from shipments where amount exceeds the count of salary from regions for the same type.
SQL: | SELECT name FROM shipments AS vnob
WHERE amount > (
SELECT COUNT(salary) FROM regions AS okiv
WHERE okiv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05052 | train |
v1 | Schema:
categories (alias: egiv)(value, amount, name, id)
items(status, type, level, salary)
Task: Find id from categories where code appears in items entries with matching level.
SQL: | SELECT id FROM categories AS egiv
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05053 | train |
v3 | Schema:
orders (alias: kab)(code, level, status, name)
managers(code, level, date, amount)
Task: Find id from orders where value exceeds the total value from managers for the same type.
SQL: | SELECT id FROM orders AS kab
WHERE value > (
SELECT SUM(value) FROM managers AS hac
WHERE hac.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05054 | train |
v1 | Schema:
tasks (alias: znob)(code, status, date, type)
branches(id, type, amount, code)
Task: Select value from tasks where id exists in branches for the same status.
SQL: | SELECT value FROM tasks AS znob
WHERE id IN (
SELECT id FROM branches AS agov
WHERE agov.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05055 | train |
v1 | Schema:
accounts (alias: jac)(code, type, level, date)
staff(status, level, value, salary)
Task: Find name from accounts where code appears in staff entries with matching level.
SQL: | SELECT name FROM accounts AS jac
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05056 | train |
v2 | Schema:
employees (alias: bev)(code, date, level, status)
regions(date, salary, name, type)
Task: Retrieve id from employees that have at least one corresponding entry in regions sharing the same code.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05057 | train |
v1 | Schema:
invoices (alias: fal)(value, status, id, date)
items(type, salary, name, value)
Task: Select id from invoices where type exists in items for the same id.
SQL: | SELECT id FROM invoices AS fal
WHERE type IN (
SELECT type FROM items AS ikob
WHERE ikob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05058 | train |
v2 | Schema:
regions (alias: okiv)(type, id, salary, code)
customers(salary, type, name, code)
Task: Find code from regions where a matching record exists in customers with the same level.
SQL: | SELECT code FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05059 | train |
v1 | Schema:
employees (alias: bev)(id, status, code, type)
orders(level, date, status, salary)
Task: Select id from employees where type exists in orders for the same level.
SQL: | SELECT id FROM employees AS bev
WHERE type IN (
SELECT type FROM orders AS kab
WHERE kab.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05060 | train |
v1 | Schema:
accounts (alias: jac)(date, status, salary, code)
items(salary, value, code, id)
Task: Retrieve id from accounts whose type is found in items rows where level matches the outer record.
SQL: | SELECT id FROM accounts AS jac
WHERE type IN (
SELECT type FROM items AS ikob
WHERE ikob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05061 | train |
v1 | Schema:
requests (alias: ejof)(status, amount, code, id)
projects(value, salary, status, amount)
Task: Retrieve salary from requests whose id is found in projects rows where type matches the outer record.
SQL: | SELECT salary FROM requests AS ejof
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05062 | train |
v2 | Schema:
categories (alias: egiv)(status, name, salary, amount)
orders(name, level, code, amount)
Task: Find salary from categories where a matching record exists in orders with the same status.
SQL: | SELECT salary 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": "salary",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05063 | train |
v2 | Schema:
invoices (alias: fal)(code, amount, id, salary)
customers(name, level, status, date)
Task: Retrieve salary from invoices that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT salary FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05064 | train |
v1 | Schema:
requests (alias: ejof)(id, name, type, level)
branches(type, level, amount, salary)
Task: Find amount from requests where level appears in branches entries with matching id.
SQL: | SELECT amount FROM requests AS ejof
WHERE level IN (
SELECT level FROM branches AS agov
WHERE agov.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05065 | train |
v2 | Schema:
orders (alias: kab)(status, value, code, level)
schedules(level, id, status, amount)
Task: Retrieve salary from orders that have at least one corresponding entry in schedules sharing the same code.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05066 | train |
v1 | Schema:
managers (alias: hac)(id, type, amount, date)
shipments(date, value, code, name)
Task: Retrieve value from managers whose status is found in shipments rows where id matches the outer record.
SQL: | SELECT value FROM managers AS hac
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05067 | train |
v1 | Schema:
categories (alias: egiv)(type, value, status, id)
invoices(date, amount, status, id)
Task: Select id from categories where type exists in invoices for the same id.
SQL: | SELECT id FROM categories AS egiv
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "invoices",
"outer_alias": "egiv",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05068 | train |
v3 | Schema:
customers (alias: lex)(level, amount, type, date)
transactions(name, amount, code, level)
Task: Retrieve amount from customers with amount above the AVG(amount) of transactions rows sharing the same level.
SQL: | SELECT amount FROM customers AS lex
WHERE amount > (
SELECT AVG(amount) FROM transactions AS gev
WHERE gev.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "transactions",
"outer_alias": "lex",
"inner_alias": "gev",
"proj_col": "amount",
"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_05069 | train |
v3 | Schema:
regions (alias: okiv)(level, date, type, amount)
transactions(code, date, status, salary)
Task: Retrieve id from regions with amount above the AVG(value) of transactions rows sharing the same id.
SQL: | SELECT id FROM regions AS okiv
WHERE amount > (
SELECT AVG(value) FROM transactions AS gev
WHERE gev.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05070 | train |
v3 | Schema:
categories (alias: egiv)(salary, name, type, code)
staff(value, code, name, date)
Task: Retrieve value from categories with amount above the MAX(amount) of staff rows sharing the same type.
SQL: | SELECT value FROM categories AS egiv
WHERE amount > (
SELECT MAX(amount) FROM staff AS xnob
WHERE xnob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05071 | train |
v3 | Schema:
items (alias: ikob)(type, level, status, amount)
employees(date, amount, status, level)
Task: Find name from items where value exceeds the total salary from employees for the same code.
SQL: | SELECT name FROM items AS ikob
WHERE value > (
SELECT SUM(salary) FROM employees AS bev
WHERE bev.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_05072 | train |
v2 | Schema:
shipments (alias: vnob)(amount, status, date, name)
sales(code, level, name, salary)
Task: Retrieve salary from shipments that have at least one corresponding entry in sales sharing the same code.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "sales",
"outer_alias": "vnob",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05073 | train |
v2 | Schema:
invoices (alias: fal)(status, value, id, type)
transactions(status, name, value, salary)
Task: Find code from invoices where a matching record exists in transactions with the same id.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05074 | train |
v1 | Schema:
invoices (alias: fal)(id, amount, date, code)
departments(salary, date, name, code)
Task: Select code from invoices where level exists in departments for the same code.
SQL: | SELECT code FROM invoices AS fal
WHERE level IN (
SELECT level FROM departments AS dov
WHERE dov.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "departments",
"outer_alias": "fal",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05075 | train |
v2 | Schema:
managers (alias: hac)(date, id, salary, code)
branches(amount, value, type, name)
Task: Find name from managers where a matching record exists in branches with the same code.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "branches",
"outer_alias": "hac",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05076 | train |
v1 | Schema:
categories (alias: egiv)(level, code, date, status)
products(name, code, id, salary)
Task: Find amount from categories where level appears in products entries with matching code.
SQL: | SELECT amount FROM categories AS egiv
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05077 | train |
v3 | Schema:
sales (alias: cif)(value, salary, status, level)
customers(name, date, value, code)
Task: Find id from sales where value exceeds the maximum salary from customers for the same status.
SQL: | SELECT id FROM sales AS cif
WHERE value > (
SELECT MAX(salary) FROM customers AS lex
WHERE lex.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05078 | train |
v2 | Schema:
categories (alias: egiv)(date, level, name, amount)
shipments(value, name, status, date)
Task: Find code from categories where a matching record exists in shipments with the same type.
SQL: | SELECT code FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "shipments",
"outer_alias": "egiv",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05079 | train |
v2 | Schema:
requests (alias: ejof)(code, id, level, type)
tasks(id, code, value, type)
Task: Find name from requests where a matching record exists in tasks with the same type.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "tasks",
"outer_alias": "ejof",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05080 | train |
v2 | Schema:
branches (alias: agov)(date, salary, type, amount)
managers(date, level, code, status)
Task: Retrieve amount from branches that have at least one corresponding entry in managers sharing the same level.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05081 | train |
v2 | Schema:
projects (alias: uliv)(name, value, code, id)
staff(status, code, id, type)
Task: Find code from projects where a matching record exists in staff with the same status.
SQL: | SELECT code FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05082 | train |
v2 | Schema:
schedules (alias: vmob)(id, level, code, status)
items(status, salary, name, id)
Task: Retrieve code from schedules that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05083 | train |
v1 | Schema:
transactions (alias: gev)(status, value, code, id)
orders(value, date, amount, id)
Task: Select value from transactions where code exists in orders for the same level.
SQL: | SELECT value FROM transactions AS gev
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05084 | train |
v2 | Schema:
employees (alias: bev)(name, status, salary, level)
transactions(type, id, salary, level)
Task: Find value from employees where a matching record exists in transactions with the same level.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "transactions",
"outer_alias": "bev",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05085 | train |
v1 | Schema:
staff (alias: xnob)(name, id, code, amount)
items(salary, status, level, date)
Task: Retrieve code from staff whose status is found in items rows where status matches the outer record.
SQL: | SELECT code FROM staff AS xnob
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05086 | train |
v1 | Schema:
schedules (alias: vmob)(date, type, code, salary)
sales(name, value, amount, code)
Task: Select code from schedules where id exists in sales for the same level.
SQL: | SELECT code FROM schedules AS vmob
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05087 | train |
v2 | Schema:
customers (alias: lex)(amount, salary, code, status)
tasks(date, type, code, status)
Task: Find amount from customers where a matching record exists in tasks with the same level.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "tasks",
"outer_alias": "lex",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05088 | train |
v3 | Schema:
branches (alias: agov)(date, type, code, level)
products(date, value, level, name)
Task: Retrieve amount from branches with salary above the AVG(amount) of products rows sharing the same level.
SQL: | SELECT amount FROM branches AS agov
WHERE salary > (
SELECT AVG(amount) FROM products AS nad
WHERE nad.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05089 | train |
v1 | Schema:
regions (alias: okiv)(status, type, id, name)
staff(date, type, level, salary)
Task: Find salary from regions where code appears in staff entries with matching type.
SQL: | SELECT salary FROM regions AS okiv
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05090 | train |
v2 | Schema:
transactions (alias: gev)(level, value, code, name)
regions(id, code, level, type)
Task: Retrieve code from transactions that have at least one corresponding entry in regions sharing the same code.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05091 | train |
v2 | Schema:
branches (alias: agov)(code, type, salary, name)
departments(id, value, amount, salary)
Task: Find amount from branches where a matching record exists in departments with the same code.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "departments",
"outer_alias": "agov",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05092 | train |
v3 | Schema:
accounts (alias: jac)(code, value, amount, salary)
items(value, name, level, code)
Task: Find id from accounts where salary exceeds the average salary from items for the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE salary > (
SELECT AVG(salary) FROM items AS ikob
WHERE ikob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05093 | train |
v1 | Schema:
branches (alias: agov)(id, name, type, salary)
shipments(date, salary, id, level)
Task: Retrieve amount from branches whose status is found in shipments rows where level matches the outer record.
SQL: | SELECT amount FROM branches AS agov
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05094 | train |
v1 | Schema:
customers (alias: lex)(name, id, level, amount)
categories(amount, type, name, status)
Task: Select code from customers where level exists in categories for the same type.
SQL: | SELECT code FROM customers AS lex
WHERE level IN (
SELECT level FROM categories AS egiv
WHERE egiv.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "categories",
"outer_alias": "lex",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05095 | train |
v1 | Schema:
accounts (alias: jac)(code, level, date, id)
employees(salary, code, value, id)
Task: Retrieve code from accounts whose id is found in employees rows where code matches the outer record.
SQL: | SELECT code FROM accounts AS jac
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "employees",
"outer_alias": "jac",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05096 | train |
v1 | Schema:
branches (alias: agov)(status, amount, code, id)
requests(value, id, type, date)
Task: Retrieve value from branches whose id is found in requests rows where status matches the outer record.
SQL: | SELECT value FROM branches AS agov
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05097 | train |
v3 | Schema:
regions (alias: okiv)(amount, value, level, status)
staff(amount, salary, status, value)
Task: Find id from regions where amount exceeds the total value from staff for the same status.
SQL: | SELECT id FROM regions AS okiv
WHERE amount > (
SELECT SUM(value) FROM staff AS xnob
WHERE xnob.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "staff",
"outer_alias": "okiv",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05098 | train |
v2 | Schema:
products (alias: nad)(level, type, date, id)
categories(date, status, id, value)
Task: Retrieve value from products that have at least one corresponding entry in categories sharing the same level.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "nad",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05099 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.