variant stringclasses 3
values | prompt stringlengths 163 234 | sql stringlengths 104 140 | metadata unknown | token_group stringclasses 2
values | id stringlengths 24 24 | split stringclasses 1
value |
|---|---|---|---|---|---|---|
v1 | Schema:
categories (alias: egiv)(name, code, type, date)
projects(name, type, id, salary)
Task: Find value from categories where id appears in projects entries with matching code.
SQL: | SELECT value FROM categories AS egiv
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01700 | train |
v1 | Schema:
regions (alias: okiv)(level, salary, date, value)
customers(value, date, type, id)
Task: Retrieve value from regions whose status is found in customers rows where code matches the outer record.
SQL: | SELECT value FROM regions AS okiv
WHERE status IN (
SELECT status FROM customers AS lex
WHERE lex.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01701 | train |
v3 | Schema:
employees (alias: bev)(status, value, amount, type)
accounts(name, amount, type, date)
Task: Retrieve id from employees with amount above the MAX(amount) of accounts rows sharing the same status.
SQL: | SELECT id FROM employees AS bev
WHERE amount > (
SELECT MAX(amount) FROM accounts AS jac
WHERE jac.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01702 | train |
v2 | Schema:
sales (alias: cif)(name, type, value, status)
transactions(id, type, salary, value)
Task: Find value from sales where a matching record exists in transactions with the same type.
SQL: | SELECT value FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "transactions",
"outer_alias": "cif",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01703 | train |
v2 | Schema:
managers (alias: hac)(code, salary, id, status)
departments(type, level, amount, value)
Task: Retrieve amount from managers that have at least one corresponding entry in departments sharing the same level.
SQL: | SELECT amount FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "departments",
"outer_alias": "hac",
"inner_alias": "dov",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01704 | train |
v2 | Schema:
staff (alias: xnob)(salary, status, amount, level)
regions(level, date, amount, salary)
Task: Retrieve name from staff that have at least one corresponding entry in regions sharing the same id.
SQL: | SELECT name FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01705 | train |
v3 | Schema:
requests (alias: ejof)(amount, code, date, name)
schedules(code, type, salary, name)
Task: Find code from requests where salary exceeds the average amount from schedules for the same status.
SQL: | SELECT code FROM requests AS ejof
WHERE salary > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01706 | train |
v1 | Schema:
requests (alias: ejof)(value, id, status, date)
regions(name, type, salary, level)
Task: Find amount from requests where code appears in regions entries with matching status.
SQL: | SELECT amount FROM requests AS ejof
WHERE code IN (
SELECT code FROM regions AS okiv
WHERE okiv.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "regions",
"outer_alias": "ejof",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01707 | train |
v2 | Schema:
customers (alias: lex)(date, status, amount, type)
branches(id, salary, date, code)
Task: Find value from customers where a matching record exists in branches with the same code.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01708 | train |
v2 | Schema:
invoices (alias: fal)(status, name, date, amount)
products(date, value, amount, name)
Task: Retrieve salary from invoices that have at least one corresponding entry in products sharing the same type.
SQL: | SELECT salary FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "products",
"outer_alias": "fal",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01709 | train |
v3 | Schema:
employees (alias: bev)(code, level, name, amount)
customers(salary, amount, id, date)
Task: Find amount from employees where salary exceeds the average salary from customers for the same code.
SQL: | SELECT amount FROM employees AS bev
WHERE salary > (
SELECT AVG(salary) FROM customers AS lex
WHERE lex.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01710 | train |
v2 | Schema:
tasks (alias: znob)(type, amount, name, id)
regions(type, status, level, salary)
Task: Find id from tasks where a matching record exists in regions with the same status.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "regions",
"outer_alias": "znob",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01711 | train |
v2 | Schema:
sales (alias: cif)(id, salary, level, type)
tasks(date, id, name, type)
Task: Find amount from sales where a matching record exists in tasks with the same level.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "tasks",
"outer_alias": "cif",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01712 | train |
v2 | Schema:
departments (alias: dov)(type, name, code, date)
sales(salary, date, level, name)
Task: Retrieve value from departments that have at least one corresponding entry in sales sharing the same type.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01713 | train |
v2 | Schema:
items (alias: ikob)(date, name, amount, level)
customers(status, amount, code, salary)
Task: Retrieve salary from items that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01714 | train |
v1 | Schema:
accounts (alias: jac)(salary, status, value, id)
products(salary, value, level, id)
Task: Retrieve id from accounts whose level is found in products rows where code matches the outer record.
SQL: | SELECT id FROM accounts AS jac
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "products",
"outer_alias": "jac",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01715 | train |
v1 | Schema:
products (alias: nad)(code, value, status, amount)
sales(code, status, amount, name)
Task: Find salary from products where code appears in sales entries with matching type.
SQL: | SELECT salary FROM products AS nad
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.type = nad.type
); | {
"outer_table": "products",
"inner_table": "sales",
"outer_alias": "nad",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01716 | train |
v1 | Schema:
staff (alias: xnob)(amount, status, salary, type)
transactions(amount, id, status, type)
Task: Select id from staff where id exists in transactions for the same type.
SQL: | SELECT id FROM staff AS xnob
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "transactions",
"outer_alias": "xnob",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01717 | train |
v3 | Schema:
orders (alias: kab)(id, date, level, salary)
schedules(id, status, level, amount)
Task: Find name from orders where amount exceeds the count of salary from schedules for the same status.
SQL: | SELECT name FROM orders AS kab
WHERE amount > (
SELECT COUNT(salary) FROM schedules AS vmob
WHERE vmob.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01718 | train |
v2 | Schema:
employees (alias: bev)(value, level, id, salary)
managers(amount, type, level, value)
Task: Find code from employees where a matching record exists in managers with the same status.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "managers",
"outer_alias": "bev",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01719 | train |
v1 | Schema:
branches (alias: agov)(value, type, status, amount)
schedules(name, level, id, status)
Task: Find name from branches where type appears in schedules entries with matching code.
SQL: | SELECT name FROM branches AS agov
WHERE type IN (
SELECT type FROM schedules AS vmob
WHERE vmob.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01720 | train |
v1 | Schema:
requests (alias: ejof)(salary, amount, type, name)
branches(name, level, salary, date)
Task: Retrieve amount from requests whose code is found in branches rows where id matches the outer record.
SQL: | SELECT amount FROM requests AS ejof
WHERE code IN (
SELECT code 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": "code",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01721 | train |
v3 | Schema:
items (alias: ikob)(value, amount, type, status)
projects(salary, level, code, id)
Task: Retrieve salary from items with amount above the SUM(value) of projects rows sharing the same level.
SQL: | SELECT salary FROM items AS ikob
WHERE amount > (
SELECT SUM(value) FROM projects AS uliv
WHERE uliv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01722 | train |
v3 | Schema:
customers (alias: lex)(date, level, type, salary)
items(id, type, status, value)
Task: Find salary from customers where value exceeds the minimum salary from items for the same status.
SQL: | SELECT salary FROM customers AS lex
WHERE value > (
SELECT MIN(salary) FROM items AS ikob
WHERE ikob.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "items",
"outer_alias": "lex",
"inner_alias": "ikob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01723 | train |
v1 | Schema:
products (alias: nad)(amount, date, id, level)
managers(id, type, status, code)
Task: Select value from products where type exists in managers for the same level.
SQL: | SELECT value FROM products AS nad
WHERE type IN (
SELECT type FROM managers AS hac
WHERE hac.level = nad.level
); | {
"outer_table": "products",
"inner_table": "managers",
"outer_alias": "nad",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01724 | train |
v3 | Schema:
shipments (alias: vnob)(type, value, amount, salary)
schedules(status, date, salary, name)
Task: Find amount from shipments where amount exceeds the total salary from schedules for the same id.
SQL: | SELECT amount FROM shipments AS vnob
WHERE amount > (
SELECT SUM(salary) FROM schedules AS vmob
WHERE vmob.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01725 | train |
v1 | Schema:
regions (alias: okiv)(level, amount, id, name)
tasks(id, type, name, status)
Task: Find value from regions where type appears in tasks entries with matching type.
SQL: | SELECT value FROM regions AS okiv
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01726 | train |
v2 | Schema:
employees (alias: bev)(amount, level, value, code)
categories(type, name, id, amount)
Task: Retrieve code from employees that have at least one corresponding entry in categories sharing the same type.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01727 | train |
v1 | Schema:
employees (alias: bev)(date, salary, type, id)
items(type, id, name, value)
Task: Select code from employees where status exists in items for the same level.
SQL: | SELECT code FROM employees AS bev
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "items",
"outer_alias": "bev",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01728 | train |
v3 | Schema:
orders (alias: kab)(name, type, code, id)
invoices(status, name, amount, salary)
Task: Retrieve code from orders with salary above the MAX(value) of invoices rows sharing the same level.
SQL: | SELECT code FROM orders AS kab
WHERE salary > (
SELECT MAX(value) FROM invoices AS fal
WHERE fal.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "invoices",
"outer_alias": "kab",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01729 | train |
v3 | Schema:
customers (alias: lex)(name, amount, status, code)
projects(status, id, level, salary)
Task: Retrieve salary from customers with amount above the SUM(value) of projects rows sharing the same code.
SQL: | SELECT salary FROM customers AS lex
WHERE amount > (
SELECT SUM(value) FROM projects AS uliv
WHERE uliv.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01730 | train |
v1 | Schema:
regions (alias: okiv)(value, status, type, name)
accounts(salary, type, code, amount)
Task: Select id from regions where level exists in accounts for the same status.
SQL: | SELECT id FROM regions AS okiv
WHERE level IN (
SELECT level FROM accounts AS jac
WHERE jac.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "accounts",
"outer_alias": "okiv",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01731 | train |
v3 | Schema:
tasks (alias: znob)(level, name, status, type)
departments(id, type, level, value)
Task: Retrieve amount from tasks with amount above the COUNT(salary) of departments rows sharing the same type.
SQL: | SELECT amount FROM tasks AS znob
WHERE amount > (
SELECT COUNT(salary) FROM departments AS dov
WHERE dov.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "departments",
"outer_alias": "znob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01732 | train |
v2 | Schema:
accounts (alias: jac)(type, date, status, code)
items(date, level, salary, type)
Task: Find salary from accounts where a matching record exists in items with the same status.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "items",
"outer_alias": "jac",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01733 | train |
v1 | Schema:
tasks (alias: znob)(level, code, type, id)
regions(type, salary, id, level)
Task: Select value from tasks where level exists in regions for the same code.
SQL: | SELECT value FROM tasks AS znob
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "regions",
"outer_alias": "znob",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01734 | train |
v3 | Schema:
transactions (alias: gev)(status, salary, id, name)
tasks(level, type, code, id)
Task: Find salary from transactions where salary exceeds the count of value from tasks for the same status.
SQL: | SELECT salary FROM transactions AS gev
WHERE salary > (
SELECT COUNT(value) FROM tasks AS znob
WHERE znob.status = gev.status
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "gev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01735 | train |
v3 | Schema:
invoices (alias: fal)(status, salary, code, amount)
customers(level, date, type, salary)
Task: Retrieve name from invoices with value above the MAX(salary) of customers rows sharing the same code.
SQL: | SELECT name FROM invoices AS fal
WHERE value > (
SELECT MAX(salary) FROM customers AS lex
WHERE lex.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "customers",
"outer_alias": "fal",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01736 | train |
v2 | Schema:
staff (alias: xnob)(status, id, salary, value)
accounts(name, value, id, salary)
Task: Find code from staff where a matching record exists in accounts with the same status.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "accounts",
"outer_alias": "xnob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01737 | train |
v3 | Schema:
sales (alias: cif)(status, level, name, id)
requests(value, salary, date, status)
Task: Retrieve amount from sales with amount above the MIN(amount) of requests rows sharing the same status.
SQL: | SELECT amount FROM sales AS cif
WHERE amount > (
SELECT MIN(amount) FROM requests AS ejof
WHERE ejof.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01738 | train |
v1 | Schema:
regions (alias: okiv)(code, name, status, type)
projects(type, code, value, id)
Task: Retrieve value from regions whose code is found in projects rows where type matches the outer record.
SQL: | SELECT value FROM regions AS okiv
WHERE code IN (
SELECT code FROM projects AS uliv
WHERE uliv.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01739 | train |
v2 | Schema:
orders (alias: kab)(id, type, code, status)
customers(level, code, name, status)
Task: Find name from orders where a matching record exists in customers with the same level.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "customers",
"outer_alias": "kab",
"inner_alias": "lex",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01740 | train |
v3 | Schema:
employees (alias: bev)(name, id, status, level)
projects(id, status, date, type)
Task: Retrieve salary from employees with salary above the SUM(amount) of projects rows sharing the same level.
SQL: | SELECT salary FROM employees AS bev
WHERE salary > (
SELECT SUM(amount) FROM projects AS uliv
WHERE uliv.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01741 | train |
v3 | Schema:
tasks (alias: znob)(value, amount, name, code)
requests(date, code, name, amount)
Task: Retrieve salary from tasks with amount above the MAX(amount) of requests rows sharing the same type.
SQL: | SELECT salary FROM tasks AS znob
WHERE amount > (
SELECT MAX(amount) FROM requests AS ejof
WHERE ejof.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01742 | train |
v2 | Schema:
schedules (alias: vmob)(code, id, date, level)
requests(salary, type, level, amount)
Task: Find name from schedules where a matching record exists in requests with the same level.
SQL: | SELECT name FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "requests",
"outer_alias": "vmob",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01743 | train |
v1 | Schema:
orders (alias: kab)(date, status, salary, code)
transactions(name, amount, salary, level)
Task: Find id from orders where type appears in transactions entries with matching code.
SQL: | SELECT id FROM orders AS kab
WHERE type IN (
SELECT type FROM transactions AS gev
WHERE gev.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01744 | train |
v2 | Schema:
accounts (alias: jac)(amount, name, type, salary)
tasks(level, id, value, amount)
Task: Retrieve salary from accounts that have at least one corresponding entry in tasks sharing the same id.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "tasks",
"outer_alias": "jac",
"inner_alias": "znob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01745 | train |
v1 | Schema:
managers (alias: hac)(salary, date, type, status)
regions(type, salary, code, level)
Task: Retrieve amount from managers whose level is found in regions rows where status matches the outer record.
SQL: | SELECT amount FROM managers AS hac
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "regions",
"outer_alias": "hac",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01746 | train |
v2 | Schema:
invoices (alias: fal)(id, name, code, value)
accounts(level, id, salary, date)
Task: Retrieve name from invoices that have at least one corresponding entry in accounts sharing the same status.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01747 | train |
v1 | Schema:
orders (alias: kab)(level, status, salary, date)
regions(amount, salary, status, code)
Task: Find amount from orders where level appears in regions entries with matching type.
SQL: | SELECT amount FROM orders AS kab
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "regions",
"outer_alias": "kab",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01748 | train |
v2 | Schema:
orders (alias: kab)(type, salary, date, code)
managers(value, level, type, name)
Task: Retrieve value from orders that have at least one corresponding entry in managers sharing the same id.
SQL: | SELECT value 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": "value",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01749 | train |
v1 | Schema:
categories (alias: egiv)(salary, status, id, value)
requests(date, name, level, value)
Task: Find salary from categories where type appears in requests entries with matching code.
SQL: | SELECT salary FROM categories AS egiv
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01750 | train |
v2 | Schema:
branches (alias: agov)(value, id, type, amount)
invoices(value, name, level, amount)
Task: Retrieve name from branches that have at least one corresponding entry in invoices sharing the same id.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "invoices",
"outer_alias": "agov",
"inner_alias": "fal",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01751 | train |
v2 | Schema:
managers (alias: hac)(level, code, name, id)
employees(level, value, amount, date)
Task: Retrieve code from managers that have at least one corresponding entry in employees sharing the same code.
SQL: | SELECT code FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01752 | train |
v2 | Schema:
transactions (alias: gev)(value, amount, id, date)
orders(salary, level, id, code)
Task: Find amount from transactions where a matching record exists in orders with the same level.
SQL: | SELECT amount FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01753 | train |
v3 | Schema:
customers (alias: lex)(code, status, value, name)
shipments(level, name, date, salary)
Task: Find value from customers where value exceeds the maximum amount from shipments for the same id.
SQL: | SELECT value FROM customers AS lex
WHERE value > (
SELECT MAX(amount) FROM shipments AS vnob
WHERE vnob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "shipments",
"outer_alias": "lex",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01754 | train |
v1 | Schema:
managers (alias: hac)(amount, value, code, salary)
invoices(salary, code, value, status)
Task: Select value from managers where level exists in invoices for the same type.
SQL: | SELECT value FROM managers AS hac
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01755 | train |
v2 | Schema:
customers (alias: lex)(id, value, code, name)
managers(salary, amount, name, type)
Task: Find id from customers where a matching record exists in managers with the same level.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01756 | train |
v2 | Schema:
branches (alias: agov)(level, amount, salary, status)
managers(date, id, status, code)
Task: Retrieve code from branches that have at least one corresponding entry in managers sharing the same status.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01757 | train |
v3 | Schema:
schedules (alias: vmob)(value, level, name, status)
managers(amount, date, level, salary)
Task: Find name from schedules where salary exceeds the average value from managers for the same code.
SQL: | SELECT name FROM schedules AS vmob
WHERE salary > (
SELECT AVG(value) FROM managers AS hac
WHERE hac.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01758 | train |
v2 | Schema:
departments (alias: dov)(id, status, code, name)
shipments(type, amount, level, name)
Task: Retrieve name from departments that have at least one corresponding entry in shipments sharing the same id.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "shipments",
"outer_alias": "dov",
"inner_alias": "vnob",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01759 | train |
v2 | Schema:
categories (alias: egiv)(id, status, value, amount)
requests(level, salary, id, name)
Task: Find amount from categories where a matching record exists in requests with the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01760 | train |
v2 | Schema:
accounts (alias: jac)(status, code, date, amount)
staff(level, type, status, value)
Task: Find value from accounts where a matching record exists in staff with the same type.
SQL: | SELECT value FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = jac.type
); | {
"outer_table": "accounts",
"inner_table": "staff",
"outer_alias": "jac",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "jac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01761 | train |
v3 | Schema:
transactions (alias: gev)(amount, type, code, status)
items(type, date, level, amount)
Task: Retrieve amount from transactions with value above the MIN(salary) of items rows sharing the same level.
SQL: | SELECT amount FROM transactions AS gev
WHERE value > (
SELECT MIN(salary) FROM items AS ikob
WHERE ikob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01762 | train |
v2 | Schema:
items (alias: ikob)(salary, type, code, value)
transactions(code, level, name, amount)
Task: Find amount from items where a matching record exists in transactions with the same code.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "transactions",
"outer_alias": "ikob",
"inner_alias": "gev",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01763 | train |
v3 | Schema:
requests (alias: ejof)(code, amount, status, name)
schedules(id, name, level, date)
Task: Find name from requests where value exceeds the maximum amount from schedules for the same type.
SQL: | SELECT name FROM requests AS ejof
WHERE value > (
SELECT MAX(amount) FROM schedules AS vmob
WHERE vmob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "schedules",
"outer_alias": "ejof",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01764 | train |
v2 | Schema:
projects (alias: uliv)(salary, amount, name, value)
items(name, code, salary, value)
Task: Find name from projects where a matching record exists in items with the same code.
SQL: | SELECT name FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01765 | train |
v2 | Schema:
departments (alias: dov)(code, amount, value, type)
products(amount, salary, type, id)
Task: Find salary from departments where a matching record exists in products with the same id.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01766 | train |
v1 | Schema:
employees (alias: bev)(date, status, name, salary)
shipments(type, salary, amount, code)
Task: Find amount from employees where level appears in shipments entries with matching type.
SQL: | SELECT amount FROM employees AS bev
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01767 | train |
v2 | Schema:
products (alias: nad)(salary, id, status, amount)
tasks(code, value, type, name)
Task: Find amount from products where a matching record exists in tasks with the same status.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = nad.status
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01768 | train |
v2 | Schema:
branches (alias: agov)(status, date, amount, level)
regions(level, type, salary, name)
Task: Retrieve value from branches that have at least one corresponding entry in regions sharing the same code.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01769 | train |
v2 | Schema:
branches (alias: agov)(salary, date, level, code)
projects(name, value, level, amount)
Task: Find value from branches where a matching record exists in projects with the same level.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "projects",
"outer_alias": "agov",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01770 | train |
v3 | Schema:
staff (alias: xnob)(amount, salary, name, level)
shipments(amount, code, id, date)
Task: Retrieve amount from staff with amount above the SUM(salary) of shipments rows sharing the same id.
SQL: | SELECT amount FROM staff AS xnob
WHERE amount > (
SELECT SUM(salary) FROM shipments AS vnob
WHERE vnob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01771 | train |
v2 | Schema:
categories (alias: egiv)(date, code, type, name)
managers(salary, type, date, status)
Task: Find amount from categories where a matching record exists in managers with the same id.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "egiv",
"inner_alias": "hac",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01772 | train |
v3 | Schema:
categories (alias: egiv)(value, code, date, status)
orders(id, level, date, code)
Task: Find value from categories where salary exceeds the count of salary from orders for the same id.
SQL: | SELECT value FROM categories AS egiv
WHERE salary > (
SELECT COUNT(salary) FROM orders AS kab
WHERE kab.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01773 | train |
v2 | Schema:
invoices (alias: fal)(type, id, code, amount)
items(type, amount, date, level)
Task: Find value from invoices where a matching record exists in items with the same level.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "items",
"outer_alias": "fal",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01774 | train |
v2 | Schema:
transactions (alias: gev)(type, value, level, name)
orders(name, value, code, level)
Task: Retrieve name from transactions that have at least one corresponding entry in orders sharing the same id.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01775 | train |
v3 | Schema:
customers (alias: lex)(salary, level, name, code)
orders(name, amount, level, code)
Task: Retrieve value from customers with amount above the SUM(salary) of orders rows sharing the same type.
SQL: | SELECT value FROM customers AS lex
WHERE amount > (
SELECT SUM(salary) FROM orders AS kab
WHERE kab.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01776 | train |
v2 | Schema:
transactions (alias: gev)(status, salary, amount, code)
schedules(id, salary, name, date)
Task: Find id from transactions where a matching record exists in schedules with the same type.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01777 | train |
v1 | Schema:
products (alias: nad)(code, status, level, amount)
schedules(amount, type, salary, value)
Task: Find value from products where code appears in schedules entries with matching code.
SQL: | SELECT value FROM products AS nad
WHERE code IN (
SELECT code FROM schedules AS vmob
WHERE vmob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "code",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01778 | train |
v3 | Schema:
products (alias: nad)(date, amount, type, salary)
branches(amount, level, value, type)
Task: Retrieve code from products with salary above the AVG(value) of branches rows sharing the same id.
SQL: | SELECT code FROM products AS nad
WHERE salary > (
SELECT AVG(value) FROM branches AS agov
WHERE agov.id = nad.id
); | {
"outer_table": "products",
"inner_table": "branches",
"outer_alias": "nad",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01779 | train |
v1 | Schema:
shipments (alias: vnob)(value, name, salary, status)
products(amount, code, level, salary)
Task: Retrieve salary from shipments whose id is found in products rows where code matches the outer record.
SQL: | SELECT salary FROM shipments AS vnob
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01780 | train |
v2 | Schema:
categories (alias: egiv)(level, date, status, value)
customers(amount, type, id, salary)
Task: Find amount from categories where a matching record exists in customers with the same level.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "customers",
"outer_alias": "egiv",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01781 | train |
v1 | Schema:
regions (alias: okiv)(type, status, date, salary)
sales(date, name, id, code)
Task: Find amount from regions where type appears in sales entries with matching type.
SQL: | SELECT amount FROM regions AS okiv
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01782 | train |
v3 | Schema:
customers (alias: lex)(date, name, amount, value)
tasks(value, amount, status, level)
Task: Retrieve salary from customers with amount above the SUM(value) of tasks rows sharing the same code.
SQL: | SELECT salary FROM customers AS lex
WHERE amount > (
SELECT SUM(value) FROM tasks AS znob
WHERE znob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "tasks",
"outer_alias": "lex",
"inner_alias": "znob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01783 | train |
v3 | Schema:
invoices (alias: fal)(date, status, name, id)
managers(name, amount, salary, value)
Task: Retrieve salary from invoices with amount above the MAX(value) of managers rows sharing the same code.
SQL: | SELECT salary FROM invoices AS fal
WHERE amount > (
SELECT MAX(value) FROM managers AS hac
WHERE hac.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01784 | train |
v3 | Schema:
employees (alias: bev)(salary, name, value, type)
customers(amount, level, id, salary)
Task: Find salary from employees where amount exceeds the maximum salary from customers for the same level.
SQL: | SELECT salary FROM employees AS bev
WHERE amount > (
SELECT MAX(salary) FROM customers AS lex
WHERE lex.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01785 | train |
v2 | Schema:
staff (alias: xnob)(value, date, amount, name)
requests(value, id, type, date)
Task: Find id from staff where a matching record exists in requests with the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "requests",
"outer_alias": "xnob",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01786 | train |
v1 | Schema:
accounts (alias: jac)(type, id, value, date)
requests(level, salary, status, value)
Task: Find id from accounts where level appears in requests entries with matching code.
SQL: | SELECT id FROM accounts AS jac
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "requests",
"outer_alias": "jac",
"inner_alias": "ejof",
"proj_col": "id",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01787 | train |
v3 | Schema:
regions (alias: okiv)(name, status, id, date)
items(type, id, status, salary)
Task: Find value from regions where value exceeds the total salary from items for the same level.
SQL: | SELECT value FROM regions AS okiv
WHERE value > (
SELECT SUM(salary) FROM items AS ikob
WHERE ikob.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "items",
"outer_alias": "okiv",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01788 | train |
v3 | Schema:
managers (alias: hac)(salary, date, type, level)
transactions(name, id, amount, status)
Task: Retrieve code from managers with value above the MAX(salary) of transactions rows sharing the same id.
SQL: | SELECT code FROM managers AS hac
WHERE value > (
SELECT MAX(salary) FROM transactions AS gev
WHERE gev.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01789 | train |
v3 | Schema:
requests (alias: ejof)(date, name, code, amount)
branches(date, status, id, value)
Task: Find amount from requests where value exceeds the maximum value from branches for the same status.
SQL: | SELECT amount FROM requests AS ejof
WHERE value > (
SELECT MAX(value) FROM branches AS agov
WHERE agov.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01790 | train |
v1 | Schema:
staff (alias: xnob)(code, status, amount, level)
managers(date, code, id, amount)
Task: Find amount from staff where level appears in managers entries with matching level.
SQL: | SELECT amount FROM staff AS xnob
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "managers",
"outer_alias": "xnob",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01791 | train |
v2 | Schema:
customers (alias: lex)(value, name, level, status)
categories(date, level, type, code)
Task: Find salary from customers where a matching record exists in categories with the same code.
SQL: | SELECT salary FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "categories",
"outer_alias": "lex",
"inner_alias": "egiv",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01792 | train |
v2 | Schema:
products (alias: nad)(salary, date, status, value)
shipments(name, type, id, code)
Task: Find salary from products where a matching record exists in shipments with the same level.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "shipments",
"outer_alias": "nad",
"inner_alias": "vnob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01793 | train |
v3 | Schema:
branches (alias: agov)(code, level, id, amount)
invoices(salary, level, date, id)
Task: Retrieve salary from branches with amount above the MIN(value) of invoices rows sharing the same status.
SQL: | SELECT salary FROM branches AS agov
WHERE amount > (
SELECT MIN(value) FROM invoices AS fal
WHERE fal.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "invoices",
"outer_alias": "agov",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01794 | train |
v1 | Schema:
departments (alias: dov)(amount, name, level, salary)
customers(date, amount, value, type)
Task: Select name from departments where level exists in customers for the same type.
SQL: | SELECT name FROM departments AS dov
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01795 | train |
v2 | Schema:
branches (alias: agov)(value, code, name, id)
customers(date, code, type, value)
Task: Find value from branches where a matching record exists in customers with the same id.
SQL: | SELECT value 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": "value",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01796 | train |
v2 | Schema:
managers (alias: hac)(salary, id, date, type)
transactions(code, status, value, type)
Task: Find name from managers where a matching record exists in transactions with the same type.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01797 | train |
v3 | Schema:
requests (alias: ejof)(level, amount, salary, name)
orders(type, id, name, value)
Task: Find id from requests where value exceeds the average value from orders for the same level.
SQL: | SELECT id FROM requests AS ejof
WHERE value > (
SELECT AVG(value) FROM orders AS kab
WHERE kab.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01798 | train |
v2 | Schema:
products (alias: nad)(name, status, code, level)
orders(value, code, level, name)
Task: Find amount from products where a matching record exists in orders with the same type.
SQL: | SELECT amount FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = nad.type
); | {
"outer_table": "products",
"inner_table": "orders",
"outer_alias": "nad",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "nad.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01799 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.