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 |
|---|---|---|---|---|---|---|
v3 | Schema:
sales (alias: cif)(date, amount, id, value)
branches(salary, name, status, id)
Task: Find code from sales where value exceeds the minimum value from branches for the same type.
SQL: | SELECT code FROM sales AS cif
WHERE value > (
SELECT MIN(value) FROM branches AS agov
WHERE agov.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00900 | train |
v2 | Schema:
branches (alias: agov)(date, amount, value, salary)
managers(status, level, name, salary)
Task: Find code from branches where a matching record exists in managers with the same type.
SQL: | SELECT code FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00901 | train |
v1 | Schema:
requests (alias: ejof)(salary, type, date, value)
items(status, date, id, salary)
Task: Retrieve amount from requests whose code is found in items rows where type matches the outer record.
SQL: | SELECT amount FROM requests AS ejof
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00902 | train |
v2 | Schema:
accounts (alias: jac)(salary, value, code, amount)
shipments(salary, name, date, value)
Task: Find code from accounts where a matching record exists in shipments with the same id.
SQL: | SELECT code FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.id = jac.id
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "jac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00903 | train |
v2 | Schema:
orders (alias: kab)(code, value, status, name)
products(value, name, date, id)
Task: Find value from orders where a matching record exists in products with the same level.
SQL: | SELECT value FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "products",
"outer_alias": "kab",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00904 | train |
v1 | Schema:
regions (alias: okiv)(id, code, salary, amount)
projects(type, name, amount, date)
Task: Find amount from regions where type appears in projects entries with matching id.
SQL: | SELECT amount FROM regions AS okiv
WHERE type IN (
SELECT type FROM projects AS uliv
WHERE uliv.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "projects",
"outer_alias": "okiv",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00905 | train |
v2 | Schema:
tasks (alias: znob)(amount, name, level, date)
requests(date, level, code, status)
Task: Retrieve code from tasks that have at least one corresponding entry in requests sharing the same code.
SQL: | SELECT code FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "requests",
"outer_alias": "znob",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00906 | train |
v2 | Schema:
regions (alias: okiv)(date, salary, name, type)
departments(status, code, name, amount)
Task: Find id from regions where a matching record exists in departments with the same status.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00907 | train |
v3 | Schema:
managers (alias: hac)(date, name, code, type)
transactions(level, type, value, date)
Task: Retrieve id from managers with salary above the SUM(salary) of transactions rows sharing the same id.
SQL: | SELECT id FROM managers AS hac
WHERE salary > (
SELECT SUM(salary) FROM transactions AS gev
WHERE gev.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00908 | train |
v1 | Schema:
categories (alias: egiv)(value, level, id, name)
products(date, name, level, salary)
Task: Find name from categories where type appears in products entries with matching status.
SQL: | SELECT name FROM categories AS egiv
WHERE type IN (
SELECT type FROM products AS nad
WHERE nad.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00909 | train |
v3 | Schema:
accounts (alias: jac)(date, name, amount, salary)
invoices(status, date, value, type)
Task: Find id from accounts where amount exceeds the maximum salary from invoices for the same code.
SQL: | SELECT id FROM accounts AS jac
WHERE amount > (
SELECT MAX(salary) FROM invoices AS fal
WHERE fal.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00910 | train |
v3 | Schema:
categories (alias: egiv)(type, salary, id, name)
projects(date, value, name, status)
Task: Find amount from categories where salary exceeds the total value from projects for the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE salary > (
SELECT SUM(value) FROM projects AS uliv
WHERE uliv.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "projects",
"outer_alias": "egiv",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00911 | train |
v1 | Schema:
categories (alias: egiv)(date, amount, name, id)
sales(level, name, id, value)
Task: Retrieve value from categories whose status is found in sales rows where level matches the outer record.
SQL: | SELECT value FROM categories AS egiv
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "sales",
"outer_alias": "egiv",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00912 | train |
v2 | Schema:
products (alias: nad)(amount, id, date, value)
managers(amount, salary, date, id)
Task: Find salary from products where a matching record exists in managers with the same code.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = nad.code
); | {
"outer_table": "products",
"inner_table": "managers",
"outer_alias": "nad",
"inner_alias": "hac",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00913 | train |
v2 | Schema:
customers (alias: lex)(value, amount, code, status)
accounts(value, amount, code, status)
Task: Retrieve salary from customers that have at least one corresponding entry in accounts sharing the same level.
SQL: | SELECT salary FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00914 | train |
v3 | Schema:
employees (alias: bev)(name, type, id, status)
orders(status, level, id, date)
Task: Retrieve value from employees with amount above the MIN(amount) of orders rows sharing the same code.
SQL: | SELECT value FROM employees AS bev
WHERE amount > (
SELECT MIN(amount) FROM orders AS kab
WHERE kab.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00915 | train |
v3 | Schema:
items (alias: ikob)(type, id, level, name)
schedules(value, id, date, status)
Task: Find value from items where value exceeds the minimum salary from schedules for the same status.
SQL: | SELECT value FROM items AS ikob
WHERE value > (
SELECT MIN(salary) FROM schedules AS vmob
WHERE vmob.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00916 | train |
v2 | Schema:
transactions (alias: gev)(name, code, id, level)
departments(level, amount, value, date)
Task: Retrieve code from transactions that have at least one corresponding entry in departments sharing the same type.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "departments",
"outer_alias": "gev",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00917 | train |
v2 | Schema:
transactions (alias: gev)(type, date, salary, status)
branches(type, salary, name, status)
Task: Find value from transactions where a matching record exists in branches with the same id.
SQL: | SELECT value FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "branches",
"outer_alias": "gev",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00918 | train |
v2 | Schema:
orders (alias: kab)(date, value, amount, type)
departments(status, level, amount, id)
Task: Retrieve name from orders that have at least one corresponding entry in departments sharing the same status.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "departments",
"outer_alias": "kab",
"inner_alias": "dov",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00919 | train |
v1 | Schema:
shipments (alias: vnob)(level, id, date, code)
employees(code, level, type, name)
Task: Retrieve amount from shipments whose type is found in employees rows where level matches the outer record.
SQL: | SELECT amount FROM shipments AS vnob
WHERE type IN (
SELECT type FROM employees AS bev
WHERE bev.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "employees",
"outer_alias": "vnob",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00920 | train |
v2 | Schema:
shipments (alias: vnob)(amount, value, date, level)
schedules(date, amount, id, code)
Task: Retrieve code from shipments that have at least one corresponding entry in schedules sharing the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "schedules",
"outer_alias": "vnob",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00921 | train |
v2 | Schema:
departments (alias: dov)(id, amount, status, level)
orders(id, status, code, type)
Task: Find amount from departments where a matching record exists in orders with the same type.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "orders",
"outer_alias": "dov",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00922 | train |
v1 | Schema:
shipments (alias: vnob)(code, status, salary, name)
requests(date, code, level, value)
Task: Find amount from shipments where id appears in requests entries with matching id.
SQL: | SELECT amount FROM shipments AS vnob
WHERE id IN (
SELECT id FROM requests AS ejof
WHERE ejof.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00923 | train |
v1 | Schema:
categories (alias: egiv)(amount, name, salary, date)
regions(id, code, value, type)
Task: Select amount from categories where level exists in regions for the same type.
SQL: | SELECT amount FROM categories AS egiv
WHERE level IN (
SELECT level FROM regions AS okiv
WHERE okiv.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00924 | train |
v2 | Schema:
shipments (alias: vnob)(amount, value, date, status)
transactions(id, amount, date, status)
Task: Find salary from shipments where a matching record exists in transactions with the same status.
SQL: | SELECT salary FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00925 | train |
v2 | Schema:
branches (alias: agov)(date, type, value, code)
transactions(salary, date, level, status)
Task: Retrieve name from branches that have at least one corresponding entry in transactions sharing the same id.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "transactions",
"outer_alias": "agov",
"inner_alias": "gev",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00926 | train |
v3 | Schema:
employees (alias: bev)(code, salary, level, status)
schedules(salary, amount, value, status)
Task: Find code from employees where salary exceeds the average amount from schedules for the same status.
SQL: | SELECT code FROM employees AS bev
WHERE salary > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "schedules",
"outer_alias": "bev",
"inner_alias": "vmob",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00927 | train |
v3 | Schema:
employees (alias: bev)(status, id, value, type)
shipments(name, amount, type, status)
Task: Retrieve value from employees with value above the COUNT(amount) of shipments rows sharing the same status.
SQL: | SELECT value FROM employees AS bev
WHERE value > (
SELECT COUNT(amount) FROM shipments AS vnob
WHERE vnob.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "shipments",
"outer_alias": "bev",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00928 | train |
v2 | Schema:
products (alias: nad)(salary, id, code, value)
categories(id, code, amount, date)
Task: Find code from products where a matching record exists in categories with the same level.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "nad",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00929 | train |
v1 | Schema:
tasks (alias: znob)(name, status, amount, type)
regions(code, level, status, id)
Task: Retrieve value from tasks whose level is found in regions rows where id matches the outer record.
SQL: | SELECT value 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": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_00930 | train |
v1 | Schema:
departments (alias: dov)(code, status, value, level)
tasks(level, amount, salary, date)
Task: Retrieve amount from departments whose id is found in tasks rows where id matches the outer record.
SQL: | SELECT amount FROM departments AS dov
WHERE id IN (
SELECT id FROM tasks AS znob
WHERE znob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "amount",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00931 | train |
v1 | Schema:
invoices (alias: fal)(name, code, id, amount)
staff(id, status, amount, value)
Task: Find id from invoices where level appears in staff entries with matching type.
SQL: | SELECT id FROM invoices AS fal
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00932 | train |
v1 | Schema:
projects (alias: uliv)(amount, value, id, status)
regions(value, salary, level, date)
Task: Retrieve value from projects whose status is found in regions rows where type matches the outer record.
SQL: | SELECT value FROM projects AS uliv
WHERE status IN (
SELECT status FROM regions AS okiv
WHERE okiv.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "regions",
"outer_alias": "uliv",
"inner_alias": "okiv",
"proj_col": "value",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00933 | train |
v1 | Schema:
sales (alias: cif)(salary, date, level, type)
managers(type, value, level, salary)
Task: Select name from sales where id exists in managers for the same code.
SQL: | SELECT name FROM sales AS cif
WHERE id IN (
SELECT id FROM managers AS hac
WHERE hac.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "managers",
"outer_alias": "cif",
"inner_alias": "hac",
"proj_col": "name",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00934 | train |
v2 | Schema:
customers (alias: lex)(id, status, value, salary)
staff(name, id, salary, type)
Task: Find amount from customers where a matching record exists in staff with the same id.
SQL: | SELECT amount FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00935 | train |
v1 | Schema:
orders (alias: kab)(amount, id, date, type)
sales(date, salary, level, name)
Task: Select salary from orders where level exists in sales for the same status.
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_00936 | train |
v1 | Schema:
invoices (alias: fal)(type, id, code, date)
requests(id, name, date, value)
Task: Find value from invoices where status appears in requests entries with matching level.
SQL: | SELECT value FROM invoices AS fal
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "requests",
"outer_alias": "fal",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00937 | train |
v1 | Schema:
staff (alias: xnob)(level, name, value, date)
customers(amount, type, value, level)
Task: Select id from staff where code exists in customers for the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE code IN (
SELECT code FROM customers AS lex
WHERE lex.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "customers",
"outer_alias": "xnob",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00938 | train |
v3 | Schema:
departments (alias: dov)(id, amount, type, name)
customers(status, type, amount, code)
Task: Retrieve name from departments with amount above the COUNT(amount) of customers rows sharing the same code.
SQL: | SELECT name FROM departments AS dov
WHERE amount > (
SELECT COUNT(amount) FROM customers AS lex
WHERE lex.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "customers",
"outer_alias": "dov",
"inner_alias": "lex",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00939 | train |
v3 | Schema:
schedules (alias: vmob)(status, code, value, name)
departments(id, value, status, amount)
Task: Retrieve amount from schedules with amount above the COUNT(amount) of departments rows sharing the same type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE amount > (
SELECT COUNT(amount) FROM departments AS dov
WHERE dov.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00940 | train |
v2 | Schema:
departments (alias: dov)(status, name, id, type)
sales(salary, status, code, amount)
Task: Retrieve id from departments that have at least one corresponding entry in sales sharing the same level.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "sales",
"outer_alias": "dov",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00941 | train |
v3 | Schema:
staff (alias: xnob)(code, value, type, id)
tasks(status, salary, name, id)
Task: Find id from staff where salary exceeds the total amount from tasks for the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE salary > (
SELECT SUM(amount) FROM tasks AS znob
WHERE znob.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "tasks",
"outer_alias": "xnob",
"inner_alias": "znob",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00942 | train |
v1 | Schema:
requests (alias: ejof)(status, id, salary, amount)
managers(value, type, level, salary)
Task: Retrieve amount from requests whose code is found in managers rows where level matches the outer record.
SQL: | SELECT amount FROM requests AS ejof
WHERE code IN (
SELECT code FROM managers AS hac
WHERE hac.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "managers",
"outer_alias": "ejof",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00943 | train |
v2 | Schema:
customers (alias: lex)(date, amount, level, id)
projects(code, name, amount, salary)
Task: Find value from customers where a matching record exists in projects with the same level.
SQL: | SELECT value FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00944 | train |
v2 | Schema:
transactions (alias: gev)(name, value, amount, status)
tasks(amount, status, type, name)
Task: Retrieve name from transactions that have at least one corresponding entry in tasks sharing the same level.
SQL: | SELECT name FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00945 | train |
v1 | Schema:
regions (alias: okiv)(salary, type, status, amount)
customers(date, status, level, name)
Task: Retrieve code from regions whose id is found in customers rows where status matches the outer record.
SQL: | SELECT code FROM regions AS okiv
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00946 | train |
v3 | Schema:
branches (alias: agov)(level, salary, date, name)
customers(amount, code, salary, id)
Task: Find value from branches where salary exceeds the count of value from customers for the same type.
SQL: | SELECT value FROM branches AS agov
WHERE salary > (
SELECT COUNT(value) FROM customers AS lex
WHERE lex.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "customers",
"outer_alias": "agov",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00947 | train |
v3 | Schema:
categories (alias: egiv)(status, type, value, date)
items(salary, value, name, amount)
Task: Retrieve value from categories with salary above the AVG(value) of items rows sharing the same code.
SQL: | SELECT value FROM categories AS egiv
WHERE salary > (
SELECT AVG(value) FROM items AS ikob
WHERE ikob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "items",
"outer_alias": "egiv",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00948 | train |
v1 | Schema:
items (alias: ikob)(code, id, value, type)
orders(id, salary, name, type)
Task: Select code from items where status exists in orders for the same code.
SQL: | SELECT code FROM items AS ikob
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "orders",
"outer_alias": "ikob",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00949 | train |
v2 | Schema:
requests (alias: ejof)(amount, status, id, type)
orders(name, type, status, salary)
Task: Retrieve value from requests that have at least one corresponding entry in orders sharing the same code.
SQL: | SELECT value FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.code = ejof.code
); | {
"outer_table": "requests",
"inner_table": "orders",
"outer_alias": "ejof",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "ejof.code",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00950 | train |
v1 | Schema:
items (alias: ikob)(value, type, name, id)
shipments(name, amount, value, salary)
Task: Select value from items where level exists in shipments for the same level.
SQL: | SELECT value FROM items AS ikob
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00951 | train |
v1 | Schema:
employees (alias: bev)(level, type, amount, name)
staff(id, amount, value, type)
Task: Find salary from employees where level appears in staff entries with matching code.
SQL: | SELECT salary FROM employees AS bev
WHERE level IN (
SELECT level FROM staff AS xnob
WHERE xnob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00952 | train |
v1 | Schema:
accounts (alias: jac)(name, id, salary, status)
shipments(salary, id, type, status)
Task: Find value from accounts where type appears in shipments entries with matching level.
SQL: | SELECT value FROM accounts AS jac
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00953 | train |
v2 | Schema:
orders (alias: kab)(amount, status, level, date)
staff(amount, date, id, level)
Task: Find amount from orders where a matching record exists in staff with the same type.
SQL: | SELECT amount FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "staff",
"outer_alias": "kab",
"inner_alias": "xnob",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00954 | train |
v2 | Schema:
employees (alias: bev)(level, id, type, salary)
branches(salary, amount, type, status)
Task: Retrieve salary from employees that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT salary FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00955 | train |
v3 | Schema:
requests (alias: ejof)(date, status, id, level)
branches(id, amount, status, date)
Task: Find id from requests where amount exceeds the count of salary from branches for the same id.
SQL: | SELECT id FROM requests AS ejof
WHERE amount > (
SELECT COUNT(salary) FROM branches AS agov
WHERE agov.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "branches",
"outer_alias": "ejof",
"inner_alias": "agov",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00956 | train |
v1 | Schema:
invoices (alias: fal)(id, name, value, amount)
sales(type, id, amount, date)
Task: Find value from invoices where level appears in sales entries with matching type.
SQL: | SELECT value FROM invoices AS fal
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "sales",
"outer_alias": "fal",
"inner_alias": "cif",
"proj_col": "value",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00957 | train |
v1 | Schema:
managers (alias: hac)(salary, value, type, status)
transactions(id, type, code, date)
Task: Select amount from managers where status exists in transactions for the same code.
SQL: | SELECT amount FROM managers AS hac
WHERE status IN (
SELECT status FROM transactions AS gev
WHERE gev.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00958 | train |
v2 | Schema:
regions (alias: okiv)(value, level, status, id)
employees(date, type, code, amount)
Task: Retrieve name from regions that have at least one corresponding entry in employees sharing the same type.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00959 | train |
v2 | Schema:
departments (alias: dov)(level, name, salary, id)
staff(type, amount, code, id)
Task: Retrieve value from departments that have at least one corresponding entry in staff sharing the same type.
SQL: | SELECT value FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = dov.type
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "dov.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00960 | train |
v1 | Schema:
schedules (alias: vmob)(id, level, name, amount)
shipments(name, type, id, level)
Task: Find amount from schedules where code appears in shipments entries with matching status.
SQL: | SELECT amount FROM schedules AS vmob
WHERE code IN (
SELECT code FROM shipments AS vnob
WHERE vnob.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "shipments",
"outer_alias": "vmob",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "code",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00961 | train |
v2 | Schema:
customers (alias: lex)(date, code, amount, value)
accounts(name, level, salary, id)
Task: Find id from customers where a matching record exists in accounts with the same type.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00962 | train |
v1 | Schema:
staff (alias: xnob)(date, status, code, amount)
departments(type, amount, name, code)
Task: Select code from staff where code exists in departments for the same level.
SQL: | SELECT code FROM staff AS xnob
WHERE code IN (
SELECT code FROM departments AS dov
WHERE dov.level = xnob.level
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "xnob.level",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00963 | train |
v2 | Schema:
requests (alias: ejof)(date, name, salary, type)
categories(value, id, amount, code)
Task: Find id from requests where a matching record exists in categories with the same level.
SQL: | SELECT id FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "categories",
"outer_alias": "ejof",
"inner_alias": "egiv",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00964 | train |
v1 | Schema:
schedules (alias: vmob)(code, type, date, name)
managers(salary, value, level, id)
Task: Find amount from schedules where level appears in managers entries with matching type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE level IN (
SELECT level FROM managers AS hac
WHERE hac.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "managers",
"outer_alias": "vmob",
"inner_alias": "hac",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00965 | train |
v1 | Schema:
sales (alias: cif)(salary, id, name, level)
items(id, level, type, code)
Task: Retrieve code from sales whose code is found in items rows where level matches the outer record.
SQL: | SELECT code FROM sales AS cif
WHERE code IN (
SELECT code FROM items AS ikob
WHERE ikob.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "items",
"outer_alias": "cif",
"inner_alias": "ikob",
"proj_col": "code",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00966 | train |
v1 | Schema:
categories (alias: egiv)(amount, code, level, name)
transactions(level, date, name, value)
Task: Find id from categories where id appears in transactions entries with matching id.
SQL: | SELECT id FROM categories AS egiv
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.id = egiv.id
); | {
"outer_table": "categories",
"inner_table": "transactions",
"outer_alias": "egiv",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "egiv.id",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00967 | train |
v2 | Schema:
projects (alias: uliv)(level, id, code, amount)
staff(code, salary, level, value)
Task: Retrieve salary from projects that have at least one corresponding entry in staff sharing the same id.
SQL: | SELECT salary FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.id = uliv.id
); | {
"outer_table": "projects",
"inner_table": "staff",
"outer_alias": "uliv",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "uliv.id",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_00968 | train |
v3 | Schema:
transactions (alias: gev)(amount, id, date, code)
tasks(date, salary, status, type)
Task: Retrieve value from transactions with salary above the MAX(value) of tasks rows sharing the same type.
SQL: | SELECT value FROM transactions AS gev
WHERE salary > (
SELECT MAX(value) FROM tasks AS znob
WHERE znob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "tasks",
"outer_alias": "gev",
"inner_alias": "znob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00969 | train |
v2 | Schema:
requests (alias: ejof)(level, date, salary, name)
shipments(status, date, amount, type)
Task: Retrieve amount from requests that have at least one corresponding entry in shipments sharing the same level.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00970 | train |
v3 | Schema:
transactions (alias: gev)(code, level, type, amount)
staff(status, date, salary, type)
Task: Find salary from transactions where amount exceeds the minimum value from staff for the same level.
SQL: | SELECT salary FROM transactions AS gev
WHERE amount > (
SELECT MIN(value) FROM staff AS xnob
WHERE xnob.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "staff",
"outer_alias": "gev",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00971 | train |
v1 | Schema:
branches (alias: agov)(status, type, id, value)
requests(status, code, value, type)
Task: Find salary from branches where status appears in requests entries with matching status.
SQL: | SELECT salary FROM branches AS agov
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "salary",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00972 | train |
v3 | Schema:
departments (alias: dov)(code, type, salary, value)
products(amount, code, name, salary)
Task: Retrieve value from departments with amount above the AVG(salary) of products rows sharing the same code.
SQL: | SELECT value FROM departments AS dov
WHERE amount > (
SELECT AVG(salary) FROM products AS nad
WHERE nad.code = dov.code
); | {
"outer_table": "departments",
"inner_table": "products",
"outer_alias": "dov",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "dov.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00973 | train |
v2 | Schema:
employees (alias: bev)(salary, value, type, status)
departments(salary, code, id, amount)
Task: Find value from employees where a matching record exists in departments with the same id.
SQL: | SELECT value FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00974 | train |
v1 | Schema:
transactions (alias: gev)(level, salary, status, id)
orders(value, status, type, amount)
Task: Select id from transactions where level exists in orders for the same id.
SQL: | SELECT id FROM transactions AS gev
WHERE level IN (
SELECT level FROM orders AS kab
WHERE kab.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "orders",
"outer_alias": "gev",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00975 | train |
v3 | Schema:
transactions (alias: gev)(name, code, date, value)
projects(id, level, amount, type)
Task: Retrieve name from transactions with value above the SUM(salary) of projects rows sharing the same level.
SQL: | SELECT name FROM transactions AS gev
WHERE value > (
SELECT SUM(salary) FROM projects AS uliv
WHERE uliv.level = gev.level
); | {
"outer_table": "transactions",
"inner_table": "projects",
"outer_alias": "gev",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00976 | train |
v2 | Schema:
customers (alias: lex)(level, date, id, name)
accounts(id, status, value, amount)
Task: Find code from customers where a matching record exists in accounts with the same code.
SQL: | SELECT code FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "accounts",
"outer_alias": "lex",
"inner_alias": "jac",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00977 | train |
v1 | Schema:
invoices (alias: fal)(salary, status, amount, date)
categories(name, salary, type, amount)
Task: Find value from invoices where type appears in categories entries with matching status.
SQL: | SELECT value FROM invoices AS fal
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "value",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00978 | train |
v3 | Schema:
transactions (alias: gev)(amount, type, id, value)
regions(amount, code, name, type)
Task: Retrieve id from transactions with value above the MIN(salary) of regions rows sharing the same id.
SQL: | SELECT id FROM transactions AS gev
WHERE value > (
SELECT MIN(salary) FROM regions AS okiv
WHERE okiv.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "regions",
"outer_alias": "gev",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00979 | train |
v2 | Schema:
staff (alias: xnob)(salary, status, id, value)
sales(type, code, id, value)
Task: Find id from staff where a matching record exists in sales with the same type.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "sales",
"outer_alias": "xnob",
"inner_alias": "cif",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_00980 | train |
v2 | Schema:
branches (alias: agov)(name, date, code, status)
managers(amount, level, type, salary)
Task: Retrieve value from branches that have at least one corresponding entry in managers sharing the same code.
SQL: | SELECT value FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM managers AS hac
WHERE hac.code = agov.code
); | {
"outer_table": "branches",
"inner_table": "managers",
"outer_alias": "agov",
"inner_alias": "hac",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "agov.code",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_00981 | train |
v3 | Schema:
schedules (alias: vmob)(code, date, name, status)
departments(id, code, type, name)
Task: Find code from schedules where value exceeds the minimum value from departments for the same code.
SQL: | SELECT code FROM schedules AS vmob
WHERE value > (
SELECT MIN(value) FROM departments AS dov
WHERE dov.code = vmob.code
); | {
"outer_table": "schedules",
"inner_table": "departments",
"outer_alias": "vmob",
"inner_alias": "dov",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "vmob.code",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_00982 | train |
v3 | Schema:
shipments (alias: vnob)(code, status, date, name)
categories(status, id, code, name)
Task: Retrieve code from shipments with salary above the COUNT(value) of categories rows sharing the same status.
SQL: | SELECT code FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(value) FROM categories AS egiv
WHERE egiv.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "categories",
"outer_alias": "vnob",
"inner_alias": "egiv",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_00983 | train |
v2 | Schema:
transactions (alias: gev)(type, level, salary, status)
requests(status, name, amount, value)
Task: Find code from transactions where a matching record exists in requests with the same code.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "requests",
"outer_alias": "gev",
"inner_alias": "ejof",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00984 | train |
v2 | Schema:
accounts (alias: jac)(date, salary, code, name)
regions(amount, date, type, code)
Task: Find amount from accounts where a matching record exists in regions with the same code.
SQL: | SELECT amount FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "regions",
"outer_alias": "jac",
"inner_alias": "okiv",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00985 | train |
v1 | Schema:
regions (alias: okiv)(status, level, type, id)
sales(name, value, date, amount)
Task: Retrieve salary from regions whose level is found in sales rows where code matches the outer record.
SQL: | SELECT salary FROM regions AS okiv
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00986 | train |
v1 | Schema:
customers (alias: lex)(amount, type, salary, status)
branches(level, id, status, code)
Task: Find salary from customers where status appears in branches entries with matching type.
SQL: | SELECT salary FROM customers AS lex
WHERE status IN (
SELECT status FROM branches AS agov
WHERE agov.type = lex.type
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "salary",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "lex.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00987 | train |
v3 | Schema:
requests (alias: ejof)(value, amount, code, id)
transactions(date, status, value, amount)
Task: Retrieve id from requests with amount above the MIN(salary) of transactions rows sharing the same id.
SQL: | SELECT id FROM requests AS ejof
WHERE amount > (
SELECT MIN(salary) FROM transactions AS gev
WHERE gev.id = ejof.id
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "ejof.id",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_00988 | train |
v1 | Schema:
products (alias: nad)(date, amount, value, id)
customers(salary, type, value, id)
Task: Find value from products where id appears in customers entries with matching level.
SQL: | SELECT value FROM products AS nad
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.level = nad.level
); | {
"outer_table": "products",
"inner_table": "customers",
"outer_alias": "nad",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00989 | train |
v2 | Schema:
employees (alias: bev)(name, salary, amount, code)
projects(amount, status, date, code)
Task: Retrieve id from employees that have at least one corresponding entry in projects sharing the same status.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "projects",
"outer_alias": "bev",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00990 | train |
v3 | Schema:
items (alias: ikob)(type, date, code, status)
staff(date, value, status, name)
Task: Retrieve name from items with salary above the SUM(amount) of staff rows sharing the same type.
SQL: | SELECT name FROM items AS ikob
WHERE salary > (
SELECT SUM(amount) FROM staff AS xnob
WHERE xnob.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00991 | train |
v2 | Schema:
regions (alias: okiv)(id, code, value, status)
tasks(level, status, amount, type)
Task: Find amount from regions where a matching record exists in tasks with the same status.
SQL: | SELECT amount FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "tasks",
"outer_alias": "okiv",
"inner_alias": "znob",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_00992 | train |
v1 | Schema:
accounts (alias: jac)(date, name, code, level)
invoices(level, amount, date, salary)
Task: Select id from accounts where type exists in invoices for the same level.
SQL: | SELECT id FROM accounts AS jac
WHERE type IN (
SELECT type FROM invoices AS fal
WHERE fal.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "invoices",
"outer_alias": "jac",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00993 | train |
v1 | Schema:
employees (alias: bev)(type, name, date, status)
orders(salary, value, type, status)
Task: Retrieve value from employees whose id is found in orders rows where status matches the outer record.
SQL: | SELECT value FROM employees AS bev
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "orders",
"outer_alias": "bev",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00994 | train |
v3 | Schema:
categories (alias: egiv)(level, name, amount, status)
regions(date, id, level, status)
Task: Find code from categories where amount exceeds the average salary from regions for the same status.
SQL: | SELECT code FROM categories AS egiv
WHERE amount > (
SELECT AVG(salary) FROM regions AS okiv
WHERE okiv.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "regions",
"outer_alias": "egiv",
"inner_alias": "okiv",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00995 | train |
v2 | Schema:
invoices (alias: fal)(value, salary, date, name)
employees(amount, id, code, value)
Task: Retrieve id from invoices that have at least one corresponding entry in employees sharing the same id.
SQL: | SELECT id FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00996 | train |
v2 | Schema:
categories (alias: egiv)(value, status, salary, date)
accounts(status, type, name, salary)
Task: Find value from categories where a matching record exists in accounts with the same type.
SQL: | SELECT value FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "accounts",
"outer_alias": "egiv",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_00997 | train |
v3 | Schema:
items (alias: ikob)(value, id, name, salary)
schedules(value, code, id, type)
Task: Find name from items where salary exceeds the maximum value from schedules for the same type.
SQL: | SELECT name FROM items AS ikob
WHERE salary > (
SELECT MAX(value) FROM schedules AS vmob
WHERE vmob.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "schedules",
"outer_alias": "ikob",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_00998 | train |
v3 | Schema:
transactions (alias: gev)(code, type, salary, level)
schedules(level, id, date, amount)
Task: Retrieve id from transactions with amount above the AVG(amount) of schedules rows sharing the same type.
SQL: | SELECT id FROM transactions AS gev
WHERE amount > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "schedules",
"outer_alias": "gev",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_00999 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.