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:
staff (alias: xnob)(type, date, amount, name)
employees(type, id, value, name)
Task: Find code from staff where a matching record exists in employees with the same id.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04300 | train |
v2 | Schema:
accounts (alias: jac)(salary, amount, id, date)
transactions(type, salary, status, value)
Task: Find amount from accounts where a matching record exists in transactions with the same status.
SQL: | SELECT amount FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04301 | train |
v1 | Schema:
accounts (alias: jac)(code, amount, status, date)
categories(salary, level, value, id)
Task: Select id from accounts where status exists in categories for the same code.
SQL: | SELECT id FROM accounts AS jac
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04302 | train |
v3 | Schema:
projects (alias: uliv)(level, salary, type, date)
employees(level, name, code, id)
Task: Find code from projects where amount exceeds the maximum value from employees for the same type.
SQL: | SELECT code FROM projects AS uliv
WHERE amount > (
SELECT MAX(value) FROM employees AS bev
WHERE bev.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "employees",
"outer_alias": "uliv",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_04303 | train |
v1 | Schema:
transactions (alias: gev)(type, code, salary, amount)
sales(name, salary, value, type)
Task: Retrieve amount from transactions whose code is found in sales rows where type matches the outer record.
SQL: | SELECT amount FROM transactions AS gev
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04304 | train |
v1 | Schema:
tasks (alias: znob)(value, date, name, level)
managers(code, id, name, date)
Task: Find name from tasks where code appears in managers entries with matching status.
SQL: | SELECT name FROM tasks AS znob
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04305 | train |
v2 | Schema:
staff (alias: xnob)(code, id, name, amount)
branches(code, name, status, date)
Task: Retrieve name from staff that have at least one corresponding entry in branches sharing the same status.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "branches",
"outer_alias": "xnob",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04306 | train |
v2 | Schema:
shipments (alias: vnob)(salary, id, date, code)
requests(salary, date, type, id)
Task: Retrieve code from shipments that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04307 | train |
v1 | Schema:
departments (alias: dov)(type, salary, name, value)
customers(status, name, id, date)
Task: Find code from departments where code appears in customers entries with matching code.
SQL: | SELECT code FROM departments AS dov
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04308 | train |
v1 | Schema:
managers (alias: hac)(date, code, type, name)
shipments(name, salary, id, level)
Task: Find id from managers where status appears in shipments entries with matching code.
SQL: | SELECT id FROM managers AS hac
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04309 | train |
v3 | Schema:
tasks (alias: znob)(date, name, code, salary)
managers(level, id, salary, date)
Task: Find name from tasks where salary exceeds the minimum amount from managers for the same code.
SQL: | SELECT name FROM tasks AS znob
WHERE salary > (
SELECT MIN(amount) FROM managers AS hac
WHERE hac.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "managers",
"outer_alias": "znob",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_04310 | train |
v1 | Schema:
regions (alias: okiv)(amount, value, status, date)
employees(value, date, type, salary)
Task: Select salary from regions where level exists in employees for the same level.
SQL: | SELECT salary FROM regions AS okiv
WHERE level IN (
SELECT level FROM employees AS bev
WHERE bev.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04311 | train |
v3 | Schema:
categories (alias: egiv)(name, type, id, salary)
staff(name, date, level, value)
Task: Find code from categories where amount exceeds the maximum amount from staff for the same code.
SQL: | SELECT code FROM categories AS egiv
WHERE amount > (
SELECT MAX(amount) FROM staff AS xnob
WHERE xnob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04312 | train |
v2 | Schema:
sales (alias: cif)(level, name, code, date)
managers(code, id, date, salary)
Task: Find amount from sales where a matching record exists in managers with the same level.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04313 | train |
v3 | Schema:
transactions (alias: gev)(salary, type, value, name)
orders(code, name, date, value)
Task: Retrieve id from transactions with salary above the MIN(value) of orders rows sharing the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE salary > (
SELECT MIN(value) FROM orders AS kab
WHERE kab.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04314 | train |
v1 | Schema:
items (alias: ikob)(salary, status, code, id)
requests(value, status, salary, code)
Task: Find code from items where status appears in requests entries with matching code.
SQL: | SELECT code FROM items AS ikob
WHERE status IN (
SELECT status 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": "status",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04315 | train |
v3 | Schema:
categories (alias: egiv)(salary, value, code, id)
staff(level, salary, type, code)
Task: Retrieve amount from categories with salary above the SUM(amount) of staff rows sharing the same level.
SQL: | SELECT amount FROM categories AS egiv
WHERE salary > (
SELECT SUM(amount) FROM staff AS xnob
WHERE xnob.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04316 | train |
v3 | Schema:
shipments (alias: vnob)(status, code, amount, salary)
transactions(value, id, name, type)
Task: Find salary from shipments where value exceeds the total amount from transactions for the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE value > (
SELECT SUM(amount) FROM transactions AS gev
WHERE gev.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04317 | train |
v2 | Schema:
departments (alias: dov)(code, id, date, name)
transactions(value, id, code, date)
Task: Find name from departments where a matching record exists in transactions with the same type.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04318 | train |
v2 | Schema:
transactions (alias: gev)(amount, type, id, name)
customers(status, name, type, amount)
Task: Find amount from transactions where a matching record exists in customers with the same level.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04319 | train |
v2 | Schema:
orders (alias: kab)(name, type, status, code)
managers(id, status, code, type)
Task: Retrieve amount from orders that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04320 | train |
v1 | Schema:
managers (alias: hac)(level, date, value, type)
schedules(status, value, name, code)
Task: Select code from managers where code exists in schedules for the same code.
SQL: | SELECT code FROM managers AS hac
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04321 | train |
v2 | Schema:
employees (alias: bev)(status, date, salary, type)
orders(code, salary, name, level)
Task: Find salary from employees where a matching record exists in orders with the same type.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04322 | train |
v2 | Schema:
departments (alias: dov)(amount, type, status, value)
customers(code, status, salary, type)
Task: Find name from departments where a matching record exists in customers with the same type.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04323 | train |
v2 | Schema:
branches (alias: agov)(name, amount, id, type)
accounts(value, code, date, amount)
Task: Retrieve amount from branches that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT amount FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04324 | train |
v2 | Schema:
schedules (alias: vmob)(level, code, name, amount)
branches(status, id, date, type)
Task: Retrieve amount from schedules that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04325 | train |
v2 | Schema:
items (alias: ikob)(name, date, level, salary)
products(name, type, date, level)
Task: Find value from items where a matching record exists in products with the same type.
SQL: | SELECT value FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04326 | train |
v1 | Schema:
departments (alias: dov)(date, type, amount, level)
accounts(salary, status, id, code)
Task: Retrieve name from departments whose level is found in accounts rows where status matches the outer record.
SQL: | SELECT name FROM departments AS dov
WHERE level IN (
SELECT level FROM accounts AS jac
WHERE jac.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "accounts",
"outer_alias": "dov",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04327 | train |
v2 | Schema:
regions (alias: okiv)(code, amount, date, salary)
transactions(value, name, level, type)
Task: Find id from regions where a matching record exists in transactions with the same type.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04328 | train |
v1 | Schema:
orders (alias: kab)(level, value, status, salary)
sales(value, status, name, salary)
Task: Retrieve id from orders whose type is found in sales rows where code matches the outer record.
SQL: | SELECT id FROM orders AS kab
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04329 | train |
v1 | Schema:
invoices (alias: fal)(name, amount, level, salary)
products(salary, type, value, name)
Task: Retrieve id from invoices whose type is found in products rows where type matches the outer record.
SQL: | SELECT id FROM invoices AS fal
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "products",
"outer_alias": "fal",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04330 | train |
v3 | Schema:
products (alias: nad)(value, amount, code, id)
regions(type, status, code, amount)
Task: Find code from products where salary exceeds the total amount from regions for the same status.
SQL: | SELECT code FROM products AS nad
WHERE salary > (
SELECT SUM(amount) FROM regions AS okiv
WHERE okiv.status = nad.status
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04331 | train |
v3 | Schema:
accounts (alias: jac)(status, salary, id, code)
projects(id, type, amount, name)
Task: Find value from accounts where salary exceeds the minimum salary from projects for the same status.
SQL: | SELECT value FROM accounts AS jac
WHERE salary > (
SELECT MIN(salary) FROM projects AS uliv
WHERE uliv.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "projects",
"outer_alias": "jac",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04332 | train |
v1 | Schema:
managers (alias: hac)(id, amount, salary, value)
items(code, type, level, id)
Task: Find amount from managers where code appears in items entries with matching type.
SQL: | SELECT amount FROM managers AS hac
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04333 | train |
v1 | Schema:
categories (alias: egiv)(value, salary, date, name)
sales(id, status, level, type)
Task: Select salary from categories where code exists in sales for the same status.
SQL: | SELECT salary FROM categories AS egiv
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "sales",
"outer_alias": "egiv",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04334 | train |
v3 | Schema:
accounts (alias: jac)(salary, type, date, id)
invoices(salary, id, level, status)
Task: Retrieve code from accounts with salary above the COUNT(amount) of invoices rows sharing the same id.
SQL: | SELECT code FROM accounts AS jac
WHERE salary > (
SELECT COUNT(amount) FROM invoices AS fal
WHERE fal.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04335 | train |
v1 | Schema:
branches (alias: agov)(type, value, status, salary)
items(status, id, type, salary)
Task: Select value from branches where id exists in items for the same status.
SQL: | SELECT value FROM branches AS agov
WHERE id IN (
SELECT id FROM items AS ikob
WHERE ikob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04336 | train |
v3 | Schema:
employees (alias: bev)(date, type, amount, code)
schedules(id, value, salary, amount)
Task: Find name from employees where salary exceeds the maximum value from schedules for the same level.
SQL: | SELECT name FROM employees AS bev
WHERE salary > (
SELECT MAX(value) FROM schedules AS vmob
WHERE vmob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04337 | train |
v2 | Schema:
sales (alias: cif)(type, status, date, name)
regions(name, status, salary, code)
Task: Find id from sales where a matching record exists in regions with the same level.
SQL: | SELECT id FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "regions",
"outer_alias": "cif",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04338 | train |
v1 | Schema:
branches (alias: agov)(date, amount, salary, type)
products(level, id, date, salary)
Task: Retrieve salary from branches whose level is found in products rows where code matches the outer record.
SQL: | SELECT salary FROM branches AS agov
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04339 | train |
v3 | Schema:
employees (alias: bev)(type, status, amount, name)
shipments(status, code, type, date)
Task: Find value from employees where value exceeds the minimum amount from shipments for the same type.
SQL: | SELECT value FROM employees AS bev
WHERE value > (
SELECT MIN(amount) FROM shipments AS vnob
WHERE vnob.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04340 | train |
v1 | Schema:
branches (alias: agov)(type, amount, code, name)
shipments(level, salary, type, id)
Task: Retrieve value from branches whose status is found in shipments rows where status matches the outer record.
SQL: | SELECT value FROM branches AS agov
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04341 | train |
v3 | Schema:
schedules (alias: vmob)(value, code, salary, type)
customers(amount, name, code, id)
Task: Find value from schedules where value exceeds the total salary from customers for the same code.
SQL: | SELECT value FROM schedules AS vmob
WHERE value > (
SELECT SUM(salary) FROM customers AS lex
WHERE lex.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04342 | train |
v3 | Schema:
employees (alias: bev)(date, value, name, status)
orders(value, type, date, salary)
Task: Retrieve id from employees with amount above the MIN(salary) of orders rows sharing the same level.
SQL: | SELECT id FROM employees AS bev
WHERE amount > (
SELECT MIN(salary) 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": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04343 | train |
v2 | Schema:
products (alias: nad)(amount, code, salary, value)
items(id, type, value, amount)
Task: Find salary from products where a matching record exists in items with the same status.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = nad.status
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04344 | train |
v3 | Schema:
staff (alias: xnob)(amount, id, date, code)
departments(type, name, status, code)
Task: Retrieve name from staff with amount above the MAX(value) of departments rows sharing the same type.
SQL: | SELECT name FROM staff AS xnob
WHERE amount > (
SELECT MAX(value) FROM departments AS dov
WHERE dov.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04345 | train |
v1 | Schema:
sales (alias: cif)(level, value, date, type)
projects(date, amount, code, type)
Task: Select salary from sales where code exists in projects for the same status.
SQL: | SELECT salary FROM sales AS cif
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04346 | train |
v3 | Schema:
accounts (alias: jac)(code, status, date, name)
requests(id, amount, code, salary)
Task: Find name from accounts where salary exceeds the average amount from requests for the same id.
SQL: | SELECT name FROM accounts AS jac
WHERE salary > (
SELECT AVG(amount) FROM requests AS ejof
WHERE ejof.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "requests",
"outer_alias": "jac",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04347 | train |
v3 | Schema:
shipments (alias: vnob)(id, status, name, type)
schedules(status, amount, id, date)
Task: Find code from shipments where amount exceeds the count of amount from schedules for the same id.
SQL: | SELECT code FROM shipments AS vnob
WHERE amount > (
SELECT COUNT(amount) FROM schedules AS vmob
WHERE vmob.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04348 | train |
v2 | Schema:
departments (alias: dov)(id, status, name, level)
branches(type, salary, code, id)
Task: Retrieve name from departments that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04349 | train |
v1 | Schema:
staff (alias: xnob)(date, id, level, value)
categories(code, type, salary, level)
Task: Select code from staff where type exists in categories for the same type.
SQL: | SELECT code FROM staff AS xnob
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04350 | train |
v1 | Schema:
items (alias: ikob)(id, name, amount, level)
transactions(salary, value, amount, date)
Task: Find name from items where code appears in transactions entries with matching id.
SQL: | SELECT name FROM items AS ikob
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "transactions",
"outer_alias": "ikob",
"inner_alias": "gev",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04351 | train |
v2 | Schema:
invoices (alias: fal)(id, status, date, code)
categories(status, type, id, code)
Task: Find id from invoices where a matching record exists in categories with the same code.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04352 | train |
v2 | Schema:
shipments (alias: vnob)(level, type, status, name)
regions(code, name, salary, id)
Task: Find code from shipments where a matching record exists in regions with the same level.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04353 | train |
v1 | Schema:
branches (alias: agov)(id, date, amount, type)
customers(value, amount, salary, id)
Task: Retrieve amount from branches whose id is found in customers rows where code matches the outer record.
SQL: | SELECT amount FROM branches AS agov
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04354 | train |
v1 | Schema:
staff (alias: xnob)(salary, value, code, level)
orders(id, name, amount, code)
Task: Retrieve value from staff whose code is found in orders rows where code matches the outer record.
SQL: | SELECT value FROM staff AS xnob
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "orders",
"outer_alias": "xnob",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04355 | train |
v2 | Schema:
branches (alias: agov)(date, status, amount, value)
accounts(value, status, date, code)
Task: Find salary from branches where a matching record exists in accounts with the same type.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04356 | train |
v2 | Schema:
regions (alias: okiv)(name, id, salary, amount)
products(date, id, salary, level)
Task: Retrieve id from regions that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04357 | train |
v2 | Schema:
sales (alias: cif)(salary, amount, value, name)
transactions(code, type, salary, value)
Task: Find amount from sales where a matching record exists in transactions with the same status.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04358 | train |
v2 | Schema:
schedules (alias: vmob)(value, code, name, level)
accounts(amount, salary, value, code)
Task: Retrieve amount from schedules that have at least one corresponding entry in accounts sharing the same type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04359 | train |
v1 | Schema:
departments (alias: dov)(name, amount, salary, type)
shipments(value, date, amount, code)
Task: Select code from departments where level exists in shipments for the same id.
SQL: | SELECT code FROM departments AS dov
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dov",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04360 | train |
v3 | Schema:
accounts (alias: jac)(status, value, name, level)
managers(code, id, type, level)
Task: Retrieve value from accounts with amount above the COUNT(salary) of managers rows sharing the same code.
SQL: | SELECT value FROM accounts AS jac
WHERE amount > (
SELECT COUNT(salary) FROM managers AS hac
WHERE hac.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04361 | train |
v3 | Schema:
transactions (alias: gev)(amount, salary, value, status)
staff(code, amount, status, salary)
Task: Retrieve value from transactions with value above the MAX(salary) of staff rows sharing the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE value > (
SELECT MAX(salary) FROM staff AS xnob
WHERE xnob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"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_04362 | train |
v1 | Schema:
regions (alias: okiv)(value, id, level, date)
employees(value, code, name, status)
Task: Select id from regions where id exists in employees for the same status.
SQL: | SELECT id FROM regions AS okiv
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04363 | train |
v2 | Schema:
staff (alias: xnob)(name, value, type, salary)
tasks(value, code, id, type)
Task: Retrieve name from staff that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04364 | train |
v2 | Schema:
employees (alias: bev)(name, id, code, amount)
shipments(code, status, amount, date)
Task: Find code from employees where a matching record exists in shipments with the same code.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04365 | train |
v1 | Schema:
categories (alias: egiv)(id, date, name, level)
shipments(date, code, type, salary)
Task: Retrieve value from categories whose code is found in shipments rows where id matches the outer record.
SQL: | SELECT value FROM categories AS egiv
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "shipments",
"outer_alias": "egiv",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04366 | train |
v2 | Schema:
accounts (alias: jac)(name, code, date, level)
sales(value, amount, date, code)
Task: Retrieve code from accounts that have at least one corresponding entry in sales sharing the same level.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04367 | train |
v1 | Schema:
shipments (alias: vnob)(id, status, value, level)
customers(status, date, code, id)
Task: Retrieve value from shipments whose level is found in customers rows where id matches the outer record.
SQL: | SELECT value FROM shipments AS vnob
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04368 | train |
v1 | Schema:
staff (alias: xnob)(salary, amount, date, code)
orders(name, date, type, level)
Task: Select code from staff where status exists in orders for the same type.
SQL: | SELECT code FROM staff AS xnob
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "orders",
"outer_alias": "xnob",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04369 | train |
v1 | Schema:
regions (alias: okiv)(id, salary, date, amount)
products(value, type, level, name)
Task: Select code from regions where level exists in products for the same type.
SQL: | SELECT code FROM regions AS okiv
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04370 | train |
v1 | Schema:
schedules (alias: vmob)(salary, value, level, date)
branches(salary, type, code, status)
Task: Find value from schedules where code appears in branches entries with matching id.
SQL: | SELECT value FROM schedules AS vmob
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "branches",
"outer_alias": "vmob",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04371 | train |
v1 | Schema:
staff (alias: xnob)(name, amount, level, type)
customers(name, date, type, value)
Task: Retrieve amount from staff whose type is found in customers rows where type matches the outer record.
SQL: | SELECT amount FROM staff AS xnob
WHERE type IN (
SELECT type FROM customers AS lex
WHERE lex.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04372 | train |
v2 | Schema:
categories (alias: egiv)(date, level, id, amount)
staff(id, salary, type, status)
Task: Find id from categories where a matching record exists in staff with the same id.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "staff",
"outer_alias": "egiv",
"inner_alias": "xnob",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04373 | train |
v1 | Schema:
items (alias: ikob)(status, salary, value, level)
projects(status, name, amount, code)
Task: Find name from items where level appears in projects entries with matching id.
SQL: | SELECT name FROM items AS ikob
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04374 | train |
v2 | Schema:
sales (alias: cif)(type, salary, name, value)
transactions(status, id, level, name)
Task: Retrieve code from sales that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT code FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04375 | train |
v2 | Schema:
departments (alias: dov)(amount, code, date, value)
transactions(status, name, amount, type)
Task: Find amount from departments where a matching record exists in transactions with the same level.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "transactions",
"outer_alias": "dov",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04376 | train |
v2 | Schema:
branches (alias: agov)(name, status, id, level)
customers(date, code, type, level)
Task: Retrieve salary from branches that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04377 | train |
v2 | Schema:
schedules (alias: vmob)(amount, id, salary, level)
tasks(amount, level, value, name)
Task: Retrieve salary from schedules that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "tasks",
"outer_alias": "vmob",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_04378 | train |
v1 | Schema:
regions (alias: okiv)(date, salary, value, status)
projects(status, level, amount, type)
Task: Find id from regions where code appears in projects entries with matching code.
SQL: | SELECT id FROM regions AS okiv
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_04379 | train |
v2 | Schema:
staff (alias: xnob)(type, value, amount, date)
tasks(type, salary, id, date)
Task: Find value from staff where a matching record exists in tasks with the same id.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04380 | train |
v2 | Schema:
employees (alias: bev)(value, code, name, type)
branches(level, date, name, value)
Task: Retrieve amount from employees that have at least one corresponding entry in branches sharing the same type.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04381 | train |
v1 | Schema:
sales (alias: cif)(value, type, name, level)
categories(date, amount, id, name)
Task: Retrieve name from sales whose type is found in categories rows where code matches the outer record.
SQL: | SELECT name FROM sales AS cif
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04382 | train |
v3 | Schema:
transactions (alias: gev)(salary, code, id, type)
shipments(name, value, code, salary)
Task: Retrieve salary from transactions with value above the AVG(value) of shipments rows sharing the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE value > (
SELECT AVG(value) FROM shipments AS vnob
WHERE vnob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04383 | train |
v1 | Schema:
accounts (alias: jac)(status, name, value, amount)
transactions(value, id, name, date)
Task: Retrieve code from accounts whose id is found in transactions rows where id matches the outer record.
SQL: | SELECT code FROM accounts AS jac
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04384 | train |
v2 | Schema:
shipments (alias: vnob)(status, id, amount, name)
orders(value, name, date, salary)
Task: Find salary from shipments where a matching record exists in orders with the same type.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "orders",
"outer_alias": "vnob",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_04385 | train |
v3 | Schema:
accounts (alias: jac)(id, name, value, salary)
regions(level, value, code, type)
Task: Find id from accounts where salary exceeds the count of salary from regions for the same code.
SQL: | SELECT id FROM accounts AS jac
WHERE salary > (
SELECT COUNT(salary) FROM regions AS okiv
WHERE okiv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04386 | train |
v1 | Schema:
sales (alias: cif)(salary, level, type, amount)
schedules(type, value, code, level)
Task: Select amount from sales where code exists in schedules for the same code.
SQL: | SELECT amount FROM sales AS cif
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "schedules",
"outer_alias": "cif",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04387 | train |
v1 | Schema:
employees (alias: bev)(level, code, name, amount)
projects(code, level, salary, id)
Task: Select value from employees where level exists in projects for the same id.
SQL: | SELECT value FROM employees AS bev
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04388 | train |
v1 | Schema:
managers (alias: hac)(amount, id, name, level)
shipments(status, type, name, code)
Task: Select value from managers where code exists in shipments for the same code.
SQL: | SELECT value FROM managers AS hac
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04389 | train |
v3 | Schema:
categories (alias: egiv)(amount, level, code, type)
requests(date, value, name, salary)
Task: Find value from categories where amount exceeds the count of value from requests for the same type.
SQL: | SELECT value FROM categories AS egiv
WHERE amount > (
SELECT COUNT(value) FROM requests AS ejof
WHERE ejof.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_04390 | train |
v2 | Schema:
requests (alias: ejof)(id, type, level, value)
projects(salary, status, code, name)
Task: Find id from requests where a matching record exists in projects with the same id.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04391 | train |
v2 | Schema:
requests (alias: ejof)(type, salary, date, value)
accounts(salary, type, value, code)
Task: Find name from requests where a matching record exists in accounts with the same type.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "accounts",
"outer_alias": "ejof",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_04392 | train |
v3 | Schema:
branches (alias: agov)(code, level, amount, status)
orders(amount, type, salary, id)
Task: Find id from branches where amount exceeds the average value from orders for the same type.
SQL: | SELECT id FROM branches AS agov
WHERE amount > (
SELECT AVG(value) FROM orders AS kab
WHERE kab.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "orders",
"outer_alias": "agov",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_04393 | train |
v3 | Schema:
products (alias: nad)(value, level, type, status)
projects(name, type, id, salary)
Task: Retrieve amount from products with value above the SUM(salary) of projects rows sharing the same status.
SQL: | SELECT amount FROM products AS nad
WHERE value > (
SELECT SUM(salary) FROM projects AS uliv
WHERE uliv.status = nad.status
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04394 | train |
v2 | Schema:
accounts (alias: jac)(code, name, amount, status)
invoices(name, type, salary, id)
Task: Retrieve id from accounts that have at least one corresponding entry in invoices sharing the same id.
SQL: | SELECT id FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04395 | train |
v1 | Schema:
transactions (alias: gev)(salary, id, code, date)
sales(salary, type, id, value)
Task: Select code from transactions where id exists in sales for the same id.
SQL: | SELECT code FROM transactions AS gev
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04396 | train |
v3 | Schema:
staff (alias: xnob)(id, date, level, amount)
requests(date, level, status, name)
Task: Find salary from staff where salary exceeds the average salary from requests for the same id.
SQL: | SELECT salary FROM staff AS xnob
WHERE salary > (
SELECT AVG(salary) FROM requests AS ejof
WHERE ejof.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_04397 | train |
v3 | Schema:
items (alias: ikob)(level, type, name, amount)
accounts(status, amount, name, code)
Task: Retrieve amount from items with amount above the MAX(amount) of accounts rows sharing the same status.
SQL: | SELECT amount FROM items AS ikob
WHERE amount > (
SELECT MAX(amount) FROM accounts AS jac
WHERE jac.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "accounts",
"outer_alias": "ikob",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_04398 | train |
v1 | Schema:
products (alias: nad)(amount, value, code, type)
regions(type, code, amount, level)
Task: Select salary from products where status exists in regions for the same level.
SQL: | SELECT salary FROM products AS nad
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "regions",
"outer_alias": "nad",
"inner_alias": "okiv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_04399 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.