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:
tasks (alias: znob)(code, id, amount, name)
invoices(status, amount, code, name)
Task: Select amount from tasks where level exists in invoices for the same status.
SQL: | SELECT amount FROM tasks AS znob
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05600 | train |
v1 | Schema:
transactions (alias: gev)(amount, type, code, id)
categories(id, salary, status, value)
Task: Retrieve name from transactions whose status is found in categories rows where id matches the outer record.
SQL: | SELECT name FROM transactions AS gev
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "categories",
"outer_alias": "gev",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05601 | train |
v3 | Schema:
employees (alias: bev)(salary, amount, date, code)
accounts(salary, status, amount, date)
Task: Retrieve name from employees with salary above the MAX(value) of accounts rows sharing the same code.
SQL: | SELECT name FROM employees AS bev
WHERE salary > (
SELECT MAX(value) FROM accounts AS jac
WHERE jac.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05602 | train |
v3 | Schema:
sales (alias: cif)(type, id, status, value)
shipments(salary, amount, level, id)
Task: Find code from sales where salary exceeds the average value from shipments for the same level.
SQL: | SELECT code FROM sales AS cif
WHERE salary > (
SELECT AVG(value) FROM shipments AS vnob
WHERE vnob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "shipments",
"outer_alias": "cif",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05603 | train |
v2 | Schema:
branches (alias: agov)(status, date, amount, value)
requests(name, id, status, code)
Task: Retrieve value from branches that have at least one corresponding entry in requests sharing the same code.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05604 | train |
v3 | Schema:
projects (alias: uliv)(code, date, value, type)
accounts(salary, date, level, name)
Task: Find salary from projects where salary exceeds the maximum value from accounts for the same level.
SQL: | SELECT salary FROM projects AS uliv
WHERE salary > (
SELECT MAX(value) FROM accounts AS jac
WHERE jac.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "accounts",
"outer_alias": "uliv",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05605 | train |
v2 | Schema:
transactions (alias: gev)(salary, id, amount, value)
customers(salary, level, type, date)
Task: Find salary from transactions where a matching record exists in customers with the same code.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05606 | train |
v2 | Schema:
branches (alias: agov)(value, date, code, level)
customers(date, id, type, salary)
Task: Find value from branches where a matching record exists in customers with the same status.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05607 | train |
v2 | Schema:
staff (alias: xnob)(level, date, type, code)
customers(salary, code, level, date)
Task: Retrieve amount from staff that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT amount FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05608 | train |
v2 | Schema:
tasks (alias: znob)(value, name, salary, id)
customers(type, value, level, id)
Task: Retrieve id from tasks that have at least one corresponding entry in customers sharing the same level.
SQL: | SELECT id FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05609 | train |
v2 | Schema:
tasks (alias: znob)(salary, date, amount, name)
accounts(value, date, code, id)
Task: Find code from tasks where a matching record exists in accounts with the same id.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05610 | train |
v2 | Schema:
categories (alias: egiv)(status, level, date, name)
regions(status, id, date, name)
Task: Retrieve id from categories that have at least one corresponding entry in regions sharing the same type.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05611 | train |
v3 | Schema:
orders (alias: kab)(id, value, salary, status)
products(id, level, code, type)
Task: Retrieve code from orders with amount above the SUM(value) of products rows sharing the same status.
SQL: | SELECT code FROM orders AS kab
WHERE amount > (
SELECT SUM(value) FROM products AS nad
WHERE nad.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05612 | train |
v2 | Schema:
branches (alias: agov)(value, level, amount, id)
transactions(salary, level, type, status)
Task: Retrieve code from branches that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05613 | train |
v1 | Schema:
managers (alias: hac)(type, level, amount, status)
products(date, salary, status, name)
Task: Retrieve name from managers whose id is found in products rows where status matches the outer record.
SQL: | SELECT name FROM managers AS hac
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "products",
"outer_alias": "hac",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05614 | train |
v1 | Schema:
transactions (alias: gev)(value, level, date, amount)
departments(code, level, name, date)
Task: Select value from transactions where type exists in departments for the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "value",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05615 | train |
v1 | Schema:
employees (alias: bev)(value, status, salary, type)
categories(type, id, level, code)
Task: Find salary from employees where id appears in categories entries with matching code.
SQL: | SELECT salary FROM employees AS bev
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "categories",
"outer_alias": "bev",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05616 | train |
v3 | Schema:
schedules (alias: vmob)(name, value, code, status)
products(type, level, id, salary)
Task: Retrieve name from schedules with amount above the MAX(value) of products rows sharing the same status.
SQL: | SELECT name FROM schedules AS vmob
WHERE amount > (
SELECT MAX(value) FROM products AS nad
WHERE nad.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05617 | train |
v1 | Schema:
tasks (alias: znob)(amount, salary, code, status)
regions(value, name, code, id)
Task: Retrieve id from tasks whose level is found in regions rows where id matches the outer record.
SQL: | SELECT id FROM tasks AS znob
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "regions",
"outer_alias": "znob",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05618 | train |
v2 | Schema:
departments (alias: dov)(level, salary, code, amount)
projects(status, value, amount, date)
Task: Find amount from departments where a matching record exists in projects with the same status.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "projects",
"outer_alias": "dov",
"inner_alias": "uliv",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05619 | train |
v1 | Schema:
sales (alias: cif)(level, code, value, id)
customers(code, id, date, type)
Task: Select name from sales where id exists in customers for the same id.
SQL: | SELECT name FROM sales AS cif
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05620 | train |
v2 | Schema:
managers (alias: hac)(amount, status, name, salary)
invoices(amount, name, id, date)
Task: Retrieve id from managers that have at least one corresponding entry in invoices sharing the same level.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05621 | train |
v2 | Schema:
projects (alias: uliv)(name, level, status, date)
regions(status, id, type, code)
Task: Find salary from projects where a matching record exists in regions with the same code.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "regions",
"outer_alias": "uliv",
"inner_alias": "okiv",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05622 | train |
v3 | Schema:
sales (alias: cif)(status, salary, amount, level)
tasks(id, status, code, name)
Task: Find value from sales where amount exceeds the total amount from tasks for the same type.
SQL: | SELECT value FROM sales AS cif
WHERE amount > (
SELECT SUM(amount) FROM tasks AS znob
WHERE znob.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "tasks",
"outer_alias": "cif",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05623 | train |
v2 | Schema:
staff (alias: xnob)(date, type, salary, level)
items(status, amount, salary, type)
Task: Retrieve value from staff that have at least one corresponding entry in items sharing the same code.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "items",
"outer_alias": "xnob",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_05624 | train |
v3 | Schema:
branches (alias: agov)(amount, code, salary, name)
accounts(code, type, level, date)
Task: Retrieve salary from branches with salary above the AVG(salary) of accounts rows sharing the same id.
SQL: | SELECT salary FROM branches AS agov
WHERE salary > (
SELECT AVG(salary) FROM accounts AS jac
WHERE jac.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05625 | train |
v3 | Schema:
transactions (alias: gev)(salary, status, code, id)
schedules(amount, name, id, level)
Task: Retrieve id from transactions with value above the MIN(value) of schedules rows sharing the same id.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT MIN(value) FROM schedules AS vmob
WHERE vmob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05626 | train |
v1 | Schema:
orders (alias: kab)(value, level, amount, id)
sales(status, amount, code, name)
Task: Retrieve salary from orders whose level is found in sales rows where status matches the outer record.
SQL: | SELECT salary FROM orders AS kab
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "sales",
"outer_alias": "kab",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05627 | train |
v1 | Schema:
tasks (alias: znob)(code, name, status, date)
staff(salary, value, amount, status)
Task: Find salary from tasks where code appears in staff entries with matching type.
SQL: | SELECT salary FROM tasks AS znob
WHERE code IN (
SELECT code FROM staff AS xnob
WHERE xnob.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05628 | train |
v1 | Schema:
projects (alias: uliv)(amount, value, salary, level)
items(type, name, amount, value)
Task: Select id from projects where level exists in items for the same level.
SQL: | SELECT id FROM projects AS uliv
WHERE level IN (
SELECT level FROM items AS ikob
WHERE ikob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "id",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_05629 | train |
v2 | Schema:
employees (alias: bev)(name, salary, level, date)
products(amount, code, status, date)
Task: Find id from employees where a matching record exists in products with the same status.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05630 | train |
v2 | Schema:
transactions (alias: gev)(salary, amount, code, type)
products(code, status, date, type)
Task: Retrieve value from transactions that have at least one corresponding entry in products sharing the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05631 | train |
v3 | Schema:
managers (alias: hac)(status, name, type, date)
items(code, id, name, date)
Task: Retrieve value from managers with value above the SUM(value) of items rows sharing the same type.
SQL: | SELECT value FROM managers AS hac
WHERE value > (
SELECT SUM(value) FROM items AS ikob
WHERE ikob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "items",
"outer_alias": "hac",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05632 | train |
v3 | Schema:
transactions (alias: gev)(type, name, amount, value)
customers(type, code, name, level)
Task: Retrieve code from transactions with salary above the MIN(amount) of customers rows sharing the same level.
SQL: | SELECT code FROM transactions AS gev
WHERE salary > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "customers",
"outer_alias": "gev",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05633 | train |
v2 | Schema:
accounts (alias: jac)(level, value, type, salary)
orders(code, name, date, level)
Task: Find value from accounts where a matching record exists in orders with the same code.
SQL: | SELECT value FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "orders",
"outer_alias": "jac",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05634 | train |
v3 | Schema:
orders (alias: kab)(value, status, name, date)
categories(status, date, amount, value)
Task: Retrieve code from orders with value above the SUM(amount) of categories rows sharing the same code.
SQL: | SELECT code FROM orders AS kab
WHERE value > (
SELECT SUM(amount) FROM categories AS egiv
WHERE egiv.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05635 | train |
v1 | Schema:
orders (alias: kab)(value, status, level, name)
accounts(value, level, salary, type)
Task: Find amount from orders where type appears in accounts entries with matching id.
SQL: | SELECT amount FROM orders AS kab
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05636 | train |
v1 | Schema:
transactions (alias: gev)(type, value, salary, date)
staff(date, salary, type, status)
Task: Retrieve id from transactions whose status is found in staff rows where type matches the outer record.
SQL: | SELECT id FROM transactions AS gev
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05637 | train |
v1 | Schema:
shipments (alias: vnob)(level, name, amount, type)
requests(status, level, type, salary)
Task: Find code from shipments where code appears in requests entries with matching type.
SQL: | SELECT code FROM shipments AS vnob
WHERE code IN (
SELECT code FROM requests AS ejof
WHERE ejof.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05638 | train |
v2 | Schema:
departments (alias: dov)(date, amount, type, code)
regions(status, level, value, code)
Task: Find value from departments where a matching record exists in regions with the same type.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05639 | train |
v1 | Schema:
categories (alias: egiv)(level, value, salary, name)
branches(value, level, amount, salary)
Task: Find amount from categories where type appears in branches entries with matching code.
SQL: | SELECT amount FROM categories AS egiv
WHERE type IN (
SELECT type FROM branches AS agov
WHERE agov.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "branches",
"outer_alias": "egiv",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05640 | train |
v1 | Schema:
managers (alias: hac)(name, id, level, status)
sales(id, status, amount, date)
Task: Find salary from managers where id appears in sales entries with matching code.
SQL: | SELECT salary FROM managers AS hac
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05641 | train |
v2 | Schema:
branches (alias: agov)(status, salary, level, amount)
items(date, id, name, type)
Task: Retrieve id from branches that have at least one corresponding entry in items sharing the same status.
SQL: | SELECT id FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05642 | train |
v3 | Schema:
employees (alias: bev)(type, value, code, amount)
sales(date, value, id, status)
Task: Find salary from employees where amount exceeds the average amount from sales for the same type.
SQL: | SELECT salary FROM employees AS bev
WHERE amount > (
SELECT AVG(amount) FROM sales AS cif
WHERE cif.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "sales",
"outer_alias": "bev",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05643 | train |
v1 | Schema:
regions (alias: okiv)(name, type, date, salary)
categories(name, code, id, date)
Task: Select name from regions where code exists in categories for the same level.
SQL: | SELECT name FROM regions AS okiv
WHERE code IN (
SELECT code FROM categories AS egiv
WHERE egiv.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05644 | train |
v1 | Schema:
branches (alias: agov)(amount, status, type, code)
shipments(code, amount, date, name)
Task: Retrieve id from branches whose type is found in shipments rows where status matches the outer record.
SQL: | SELECT id FROM branches AS agov
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05645 | train |
v2 | Schema:
branches (alias: agov)(date, value, level, id)
items(status, type, amount, id)
Task: Find salary from branches where a matching record exists in items with the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "items",
"outer_alias": "agov",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05646 | train |
v2 | Schema:
categories (alias: egiv)(level, value, status, id)
staff(type, id, date, name)
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_05647 | train |
v3 | Schema:
products (alias: nad)(id, date, amount, salary)
transactions(id, amount, name, type)
Task: Retrieve value from products with value above the MIN(salary) of transactions rows sharing the same code.
SQL: | SELECT value FROM products AS nad
WHERE value > (
SELECT MIN(salary) FROM transactions AS gev
WHERE gev.code = nad.code
); | {
"outer_table": "products",
"inner_table": "transactions",
"outer_alias": "nad",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05648 | train |
v3 | Schema:
invoices (alias: fal)(id, code, amount, name)
accounts(salary, value, id, name)
Task: Retrieve amount from invoices with salary above the SUM(value) of accounts rows sharing the same code.
SQL: | SELECT amount FROM invoices AS fal
WHERE salary > (
SELECT SUM(value) FROM accounts AS jac
WHERE jac.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05649 | train |
v3 | Schema:
shipments (alias: vnob)(value, code, salary, level)
regions(level, code, value, name)
Task: Find value from shipments where salary exceeds the maximum amount from regions for the same type.
SQL: | SELECT value FROM shipments AS vnob
WHERE salary > (
SELECT MAX(amount) FROM regions AS okiv
WHERE okiv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "regions",
"outer_alias": "vnob",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05650 | train |
v3 | Schema:
invoices (alias: fal)(code, value, salary, level)
categories(type, status, value, code)
Task: Retrieve amount from invoices with value above the MIN(value) of categories rows sharing the same status.
SQL: | SELECT amount FROM invoices AS fal
WHERE value > (
SELECT MIN(value) FROM categories AS egiv
WHERE egiv.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05651 | train |
v1 | Schema:
customers (alias: lex)(id, date, name, code)
managers(type, value, salary, level)
Task: Retrieve amount from customers whose status is found in managers rows where level matches the outer record.
SQL: | SELECT amount FROM customers AS lex
WHERE status IN (
SELECT status FROM managers AS hac
WHERE hac.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "managers",
"outer_alias": "lex",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05652 | train |
v3 | Schema:
managers (alias: hac)(amount, type, name, id)
products(name, level, salary, id)
Task: Retrieve value from managers with amount above the MIN(salary) of products rows sharing the same status.
SQL: | SELECT value FROM managers AS hac
WHERE amount > (
SELECT MIN(salary) FROM products AS nad
WHERE nad.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "products",
"outer_alias": "hac",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05653 | train |
v2 | Schema:
schedules (alias: vmob)(name, id, code, value)
orders(name, value, date, salary)
Task: Find value from schedules where a matching record exists in orders with the same status.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "orders",
"outer_alias": "vmob",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05654 | train |
v2 | Schema:
categories (alias: egiv)(code, id, type, date)
accounts(amount, date, status, salary)
Task: Find amount from categories where a matching record exists in accounts with the same code.
SQL: | SELECT amount FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05655 | train |
v2 | Schema:
invoices (alias: fal)(amount, type, value, code)
accounts(salary, value, level, status)
Task: Retrieve name from invoices that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "accounts",
"outer_alias": "fal",
"inner_alias": "jac",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05656 | train |
v3 | Schema:
categories (alias: egiv)(salary, date, type, value)
shipments(status, salary, date, type)
Task: Find name from categories where salary exceeds the average salary from shipments for the same status.
SQL: | SELECT name FROM categories AS egiv
WHERE salary > (
SELECT AVG(salary) FROM shipments AS vnob
WHERE vnob.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "shipments",
"outer_alias": "egiv",
"inner_alias": "vnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05657 | train |
v2 | Schema:
customers (alias: lex)(type, code, value, date)
staff(type, value, level, status)
Task: Retrieve amount from customers that have at least one corresponding entry in staff sharing the same level.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05658 | train |
v3 | Schema:
regions (alias: okiv)(status, type, value, name)
categories(status, salary, code, level)
Task: Retrieve salary from regions with amount above the MIN(value) of categories rows sharing the same id.
SQL: | SELECT salary FROM regions AS okiv
WHERE amount > (
SELECT MIN(value) FROM categories AS egiv
WHERE egiv.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "categories",
"outer_alias": "okiv",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05659 | train |
v2 | Schema:
transactions (alias: gev)(salary, id, status, date)
managers(id, name, level, date)
Task: Retrieve code from transactions that have at least one corresponding entry in managers sharing the same code.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "managers",
"outer_alias": "gev",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05660 | train |
v1 | Schema:
managers (alias: hac)(salary, amount, code, level)
invoices(date, id, salary, code)
Task: Retrieve salary from managers whose id is found in invoices rows where type matches the outer record.
SQL: | SELECT salary FROM managers AS hac
WHERE id IN (
SELECT id FROM invoices AS fal
WHERE fal.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05661 | train |
v1 | Schema:
sales (alias: cif)(name, salary, status, value)
categories(status, value, date, level)
Task: Retrieve salary from sales whose status is found in categories rows where level matches the outer record.
SQL: | SELECT salary FROM sales AS cif
WHERE status IN (
SELECT status FROM categories AS egiv
WHERE egiv.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "categories",
"outer_alias": "cif",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05662 | train |
v2 | Schema:
orders (alias: kab)(id, code, status, salary)
products(level, name, salary, status)
Task: Find salary from orders where a matching record exists in products with the same id.
SQL: | SELECT salary FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05663 | train |
v2 | Schema:
transactions (alias: gev)(code, salary, type, amount)
shipments(salary, id, amount, date)
Task: Find id from transactions where a matching record exists in shipments with the same code.
SQL: | SELECT id FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05664 | train |
v2 | Schema:
branches (alias: agov)(salary, amount, id, date)
regions(date, amount, id, salary)
Task: Find name from branches where a matching record exists in regions with the same id.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "regions",
"outer_alias": "agov",
"inner_alias": "okiv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_05665 | train |
v1 | Schema:
departments (alias: dov)(code, level, type, date)
invoices(id, level, date, type)
Task: Retrieve salary from departments whose status is found in invoices rows where id matches the outer record.
SQL: | SELECT salary FROM departments AS dov
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "salary",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05666 | train |
v2 | Schema:
departments (alias: dov)(date, name, status, code)
staff(type, level, code, salary)
Task: Find amount from departments where a matching record exists in staff with the same id.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05667 | train |
v1 | Schema:
managers (alias: hac)(salary, date, id, type)
schedules(salary, type, name, code)
Task: Find id from managers where level appears in schedules entries with matching code.
SQL: | SELECT id FROM managers AS hac
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "schedules",
"outer_alias": "hac",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05668 | train |
v1 | Schema:
sales (alias: cif)(name, date, amount, value)
projects(value, code, salary, name)
Task: Select id from sales where id exists in projects for the same id.
SQL: | SELECT id FROM sales AS cif
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05669 | train |
v3 | Schema:
tasks (alias: znob)(id, date, code, name)
categories(code, status, value, amount)
Task: Retrieve code from tasks with salary above the COUNT(amount) of categories rows sharing the same code.
SQL: | SELECT code FROM tasks AS znob
WHERE salary > (
SELECT COUNT(amount) FROM categories AS egiv
WHERE egiv.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "categories",
"outer_alias": "znob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_05670 | train |
v2 | Schema:
invoices (alias: fal)(salary, amount, status, code)
managers(value, type, level, date)
Task: Find id from invoices where a matching record exists in managers with the same level.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05671 | train |
v2 | Schema:
shipments (alias: vnob)(level, status, amount, id)
regions(id, salary, amount, level)
Task: Find id from shipments where a matching record exists in regions with the same level.
SQL: | SELECT id 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": "id",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05672 | train |
v3 | Schema:
schedules (alias: vmob)(date, amount, status, id)
sales(value, salary, code, status)
Task: Find amount from schedules where salary exceeds the total amount from sales for the same type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE salary > (
SELECT SUM(amount) FROM sales AS cif
WHERE cif.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05673 | train |
v1 | Schema:
employees (alias: bev)(type, date, value, id)
regions(code, name, salary, id)
Task: Retrieve code from employees whose id is found in regions rows where id matches the outer record.
SQL: | SELECT code FROM employees AS bev
WHERE id IN (
SELECT id FROM regions AS okiv
WHERE okiv.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "regions",
"outer_alias": "bev",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05674 | train |
v3 | Schema:
invoices (alias: fal)(name, code, id, salary)
managers(salary, date, status, level)
Task: Find name from invoices where value exceeds the maximum value from managers for the same status.
SQL: | SELECT name FROM invoices AS fal
WHERE value > (
SELECT MAX(value) FROM managers AS hac
WHERE hac.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "managers",
"outer_alias": "fal",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05675 | train |
v2 | Schema:
schedules (alias: vmob)(date, value, level, amount)
accounts(type, amount, level, code)
Task: Retrieve code from schedules that have at least one corresponding entry in accounts sharing the same id.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "accounts",
"outer_alias": "vmob",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05676 | train |
v2 | Schema:
products (alias: nad)(code, salary, type, name)
requests(value, name, amount, type)
Task: Retrieve id from products that have at least one corresponding entry in requests sharing the same code.
SQL: | SELECT id FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = nad.code
); | {
"outer_table": "products",
"inner_table": "requests",
"outer_alias": "nad",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05677 | train |
v3 | Schema:
invoices (alias: fal)(code, id, date, level)
transactions(id, status, date, code)
Task: Find amount from invoices where amount exceeds the maximum amount from transactions for the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE amount > (
SELECT MAX(amount) FROM transactions AS gev
WHERE gev.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05678 | train |
v2 | Schema:
invoices (alias: fal)(name, id, amount, date)
transactions(name, salary, code, level)
Task: Retrieve value from invoices that have at least one corresponding entry in transactions sharing the same status.
SQL: | SELECT value FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "transactions",
"outer_alias": "fal",
"inner_alias": "gev",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05679 | train |
v3 | Schema:
requests (alias: ejof)(level, name, value, id)
sales(status, amount, name, id)
Task: Find code from requests where salary exceeds the count of salary from sales for the same code.
SQL: | SELECT code FROM requests AS ejof
WHERE salary > (
SELECT COUNT(salary) FROM sales AS cif
WHERE cif.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_05680 | train |
v3 | Schema:
invoices (alias: fal)(id, amount, type, status)
schedules(amount, name, salary, type)
Task: Find id from invoices where value exceeds the count of salary from schedules for the same code.
SQL: | SELECT id FROM invoices AS fal
WHERE value > (
SELECT COUNT(salary) FROM schedules AS vmob
WHERE vmob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05681 | train |
v2 | Schema:
categories (alias: egiv)(type, name, salary, value)
projects(salary, type, date, amount)
Task: Find id from categories where a matching record exists in projects with the same level.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05682 | train |
v2 | Schema:
customers (alias: lex)(name, level, value, amount)
projects(value, level, salary, date)
Task: Find code from customers where a matching record exists in projects with the same status.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05683 | train |
v3 | Schema:
orders (alias: kab)(level, amount, date, type)
products(date, level, salary, status)
Task: Find salary from orders where amount exceeds the total salary from products for the same id.
SQL: | SELECT salary FROM orders AS kab
WHERE amount > (
SELECT SUM(salary) FROM products AS nad
WHERE nad.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05684 | train |
v3 | Schema:
departments (alias: dov)(name, date, level, salary)
schedules(name, code, value, amount)
Task: Find code from departments where amount exceeds the minimum amount from schedules for the same type.
SQL: | SELECT code FROM departments AS dov
WHERE amount > (
SELECT MIN(amount) FROM schedules AS vmob
WHERE vmob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "schedules",
"outer_alias": "dov",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05685 | train |
v3 | Schema:
invoices (alias: fal)(date, code, name, value)
staff(value, salary, code, amount)
Task: Retrieve salary from invoices with value above the SUM(amount) of staff rows sharing the same level.
SQL: | SELECT salary FROM invoices AS fal
WHERE value > (
SELECT SUM(amount) FROM staff AS xnob
WHERE xnob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05686 | train |
v1 | Schema:
schedules (alias: vmob)(salary, name, amount, value)
staff(type, name, status, amount)
Task: Retrieve salary from schedules whose id is found in staff rows where code matches the outer record.
SQL: | SELECT salary FROM schedules AS vmob
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "staff",
"outer_alias": "vmob",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05687 | train |
v2 | Schema:
products (alias: nad)(status, value, type, code)
schedules(code, name, value, status)
Task: Retrieve salary from products that have at least one corresponding entry in schedules sharing the same level.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = nad.level
); | {
"outer_table": "products",
"inner_table": "schedules",
"outer_alias": "nad",
"inner_alias": "vmob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05688 | train |
v3 | Schema:
employees (alias: bev)(value, type, id, amount)
accounts(name, value, type, status)
Task: Find salary from employees where value exceeds the minimum salary from accounts for the same code.
SQL: | SELECT salary FROM employees AS bev
WHERE value > (
SELECT MIN(salary) FROM accounts AS jac
WHERE jac.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05689 | train |
v3 | Schema:
regions (alias: okiv)(salary, value, amount, date)
products(value, level, salary, date)
Task: Retrieve name from regions with amount above the MIN(salary) of products rows sharing the same level.
SQL: | SELECT name FROM regions AS okiv
WHERE amount > (
SELECT MIN(salary) FROM products AS nad
WHERE nad.level = okiv.level
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "okiv.level",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_05690 | train |
v3 | Schema:
schedules (alias: vmob)(status, salary, type, id)
categories(code, date, status, id)
Task: Find code from schedules where amount exceeds the maximum salary from categories for the same level.
SQL: | SELECT code FROM schedules AS vmob
WHERE amount > (
SELECT MAX(salary) FROM categories AS egiv
WHERE egiv.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "categories",
"outer_alias": "vmob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05691 | train |
v2 | Schema:
sales (alias: cif)(amount, code, type, date)
customers(type, id, amount, salary)
Task: Find amount from sales where a matching record exists in customers with the same id.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05692 | train |
v2 | Schema:
transactions (alias: gev)(status, id, value, name)
requests(value, status, code, salary)
Task: Retrieve salary from transactions that have at least one corresponding entry in requests sharing the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05693 | train |
v3 | Schema:
invoices (alias: fal)(name, id, type, status)
shipments(type, name, amount, code)
Task: Find id from invoices where amount exceeds the average amount from shipments for the same id.
SQL: | SELECT id FROM invoices AS fal
WHERE amount > (
SELECT AVG(amount) FROM shipments AS vnob
WHERE vnob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "shipments",
"outer_alias": "fal",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05694 | train |
v2 | Schema:
managers (alias: hac)(salary, level, code, amount)
sales(status, level, amount, type)
Task: Find id from managers where a matching record exists in sales with the same level.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05695 | train |
v2 | Schema:
shipments (alias: vnob)(value, salary, id, date)
staff(date, amount, level, name)
Task: Retrieve name from shipments that have at least one corresponding entry in staff sharing the same status.
SQL: | SELECT name FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_05696 | train |
v2 | Schema:
schedules (alias: vmob)(salary, code, level, value)
items(code, id, type, value)
Task: Retrieve salary from schedules that have at least one corresponding entry in items sharing the same type.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_05697 | train |
v3 | Schema:
categories (alias: egiv)(code, date, value, amount)
accounts(code, id, date, level)
Task: Retrieve id from categories with salary above the MAX(salary) of accounts rows sharing the same level.
SQL: | SELECT id FROM categories AS egiv
WHERE salary > (
SELECT MAX(salary) FROM accounts AS jac
WHERE jac.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_05698 | train |
v2 | Schema:
departments (alias: dov)(id, salary, name, level)
employees(id, status, code, date)
Task: Retrieve salary from departments that have at least one corresponding entry in employees sharing the same type.
SQL: | SELECT salary FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "employees",
"outer_alias": "dov",
"inner_alias": "bev",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_05699 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.