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)(salary, type, status, id)
customers(salary, id, status, type)
Task: Select salary from tasks where level exists in customers for the same status.
SQL: | SELECT salary FROM tasks AS znob
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "customers",
"outer_alias": "znob",
"inner_alias": "lex",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_02900 | train |
v2 | Schema:
transactions (alias: gev)(type, name, status, id)
items(level, value, id, status)
Task: Find code from transactions where a matching record exists in items with the same code.
SQL: | SELECT code FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.code = gev.code
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "gev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02901 | train |
v1 | Schema:
shipments (alias: vnob)(name, id, status, type)
customers(level, type, code, value)
Task: Select value from shipments where level exists in customers for the same level.
SQL: | SELECT value FROM shipments AS vnob
WHERE level IN (
SELECT level FROM customers AS lex
WHERE lex.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_02902 | train |
v1 | Schema:
departments (alias: dov)(name, id, salary, code)
accounts(name, value, level, code)
Task: Select name from departments where id exists in accounts for the same id.
SQL: | SELECT name FROM departments AS dov
WHERE id IN (
SELECT id FROM accounts AS jac
WHERE jac.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "accounts",
"outer_alias": "dov",
"inner_alias": "jac",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02903 | train |
v1 | Schema:
accounts (alias: jac)(id, name, level, value)
transactions(code, level, amount, name)
Task: Select salary from accounts where level exists in transactions for the same code.
SQL: | SELECT salary FROM accounts AS jac
WHERE level IN (
SELECT level FROM transactions AS gev
WHERE gev.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "transactions",
"outer_alias": "jac",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02904 | train |
v2 | Schema:
invoices (alias: fal)(value, level, date, salary)
categories(code, status, amount, name)
Task: Find name from invoices where a matching record exists in categories with the same type.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.type = fal.type
); | {
"outer_table": "invoices",
"inner_table": "categories",
"outer_alias": "fal",
"inner_alias": "egiv",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "fal.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02905 | train |
v2 | Schema:
accounts (alias: jac)(value, date, id, amount)
customers(date, code, type, id)
Task: Find salary from accounts where a matching record exists in customers with the same code.
SQL: | SELECT salary FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "customers",
"outer_alias": "jac",
"inner_alias": "lex",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02906 | train |
v2 | Schema:
items (alias: ikob)(name, level, id, amount)
staff(name, type, status, date)
Task: Find salary from items where a matching record exists in staff with the same level.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_02907 | train |
v1 | Schema:
regions (alias: okiv)(date, level, amount, status)
shipments(salary, value, level, type)
Task: Find code from regions where level appears in shipments entries with matching type.
SQL: | SELECT code FROM regions AS okiv
WHERE level IN (
SELECT level FROM shipments AS vnob
WHERE vnob.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "shipments",
"outer_alias": "okiv",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_02908 | train |
v1 | Schema:
managers (alias: hac)(date, name, level, code)
employees(code, amount, name, value)
Task: Retrieve salary from managers whose id is found in employees rows where status matches the outer record.
SQL: | SELECT salary FROM managers AS hac
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.status = hac.status
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "hac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02909 | train |
v1 | Schema:
accounts (alias: jac)(status, id, name, salary)
sales(date, amount, type, name)
Task: Select amount from accounts where level exists in sales for the same code.
SQL: | SELECT amount FROM accounts AS jac
WHERE level IN (
SELECT level FROM sales AS cif
WHERE cif.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "sales",
"outer_alias": "jac",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "level",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02910 | train |
v1 | Schema:
regions (alias: okiv)(value, name, status, salary)
transactions(value, type, name, code)
Task: Find code from regions where id appears in transactions entries with matching code.
SQL: | SELECT code FROM regions AS okiv
WHERE id IN (
SELECT id FROM transactions AS gev
WHERE gev.code = okiv.code
); | {
"outer_table": "regions",
"inner_table": "transactions",
"outer_alias": "okiv",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "id",
"join_col": "code",
"correlated_ref": "okiv.code",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_02911 | train |
v1 | Schema:
managers (alias: hac)(name, level, status, salary)
sales(value, salary, id, status)
Task: Retrieve name from managers whose id is found in sales rows where id matches the outer record.
SQL: | SELECT name FROM managers AS hac
WHERE id IN (
SELECT id FROM sales AS cif
WHERE cif.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02912 | train |
v3 | Schema:
categories (alias: egiv)(date, level, code, value)
customers(level, salary, status, date)
Task: Find value from categories where salary exceeds the minimum amount from customers for the same level.
SQL: | SELECT value FROM categories AS egiv
WHERE salary > (
SELECT MIN(amount) FROM customers AS lex
WHERE lex.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "customers",
"outer_alias": "egiv",
"inner_alias": "lex",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_02913 | train |
v3 | Schema:
transactions (alias: gev)(type, code, level, date)
items(date, level, status, value)
Task: Retrieve amount from transactions with amount above the MIN(salary) of items rows sharing the same id.
SQL: | SELECT amount FROM transactions AS gev
WHERE amount > (
SELECT MIN(salary) FROM items AS ikob
WHERE ikob.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "items",
"outer_alias": "gev",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02914 | train |
v2 | Schema:
regions (alias: okiv)(date, salary, amount, code)
products(status, salary, name, id)
Task: Find name from regions where a matching record exists in products with the same type.
SQL: | SELECT name FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "products",
"outer_alias": "okiv",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_02915 | train |
v3 | Schema:
regions (alias: okiv)(id, date, salary, status)
employees(code, salary, id, value)
Task: Find value from regions where value exceeds the count of amount from employees for the same id.
SQL: | SELECT value FROM regions AS okiv
WHERE value > (
SELECT COUNT(amount) FROM employees AS bev
WHERE bev.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_02916 | train |
v2 | Schema:
tasks (alias: znob)(status, level, name, salary)
orders(status, date, type, id)
Task: Find value from tasks where a matching record exists in orders with the same type.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_02917 | train |
v1 | Schema:
categories (alias: egiv)(status, date, amount, value)
shipments(status, code, value, level)
Task: Select name from categories where id exists in shipments for the same status.
SQL: | SELECT name FROM categories AS egiv
WHERE id IN (
SELECT id 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": "id",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_02918 | train |
v2 | Schema:
sales (alias: cif)(salary, level, amount, id)
departments(salary, date, value, id)
Task: Find name from sales where a matching record exists in departments with the same type.
SQL: | SELECT name FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "departments",
"outer_alias": "cif",
"inner_alias": "dov",
"proj_col": "name",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02919 | train |
v1 | Schema:
employees (alias: bev)(date, amount, salary, id)
transactions(status, amount, value, type)
Task: Retrieve value from employees whose code is found in transactions rows where level matches the outer record.
SQL: | SELECT value FROM employees AS bev
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.level = bev.level
); | {
"outer_table": "employees",
"inner_table": "transactions",
"outer_alias": "bev",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "bev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02920 | train |
v2 | Schema:
employees (alias: bev)(id, level, type, amount)
customers(level, code, name, amount)
Task: Find amount from employees where a matching record exists in customers with the same code.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02921 | train |
v1 | Schema:
managers (alias: hac)(level, name, value, amount)
sales(type, name, amount, date)
Task: Retrieve code from managers whose status is found in sales rows where id matches the outer record.
SQL: | SELECT code FROM managers AS hac
WHERE status IN (
SELECT status FROM sales AS cif
WHERE cif.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "sales",
"outer_alias": "hac",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02922 | train |
v2 | Schema:
orders (alias: kab)(id, code, value, type)
shipments(name, value, id, status)
Task: Retrieve id from orders that have at least one corresponding entry in shipments sharing the same status.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "shipments",
"outer_alias": "kab",
"inner_alias": "vnob",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02923 | train |
v2 | Schema:
categories (alias: egiv)(level, amount, type, id)
requests(date, id, type, code)
Task: Retrieve id from categories that have at least one corresponding entry in requests sharing the same level.
SQL: | SELECT id FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "id",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_02924 | train |
v2 | Schema:
products (alias: nad)(id, amount, code, type)
invoices(id, name, type, value)
Task: Find code from products where a matching record exists in invoices with the same level.
SQL: | SELECT code FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = nad.level
); | {
"outer_table": "products",
"inner_table": "invoices",
"outer_alias": "nad",
"inner_alias": "fal",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02925 | train |
v2 | Schema:
items (alias: ikob)(type, status, id, code)
staff(salary, code, date, value)
Task: Retrieve salary from items that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT salary FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_02926 | train |
v1 | Schema:
items (alias: ikob)(id, type, date, value)
staff(value, type, level, salary)
Task: Select salary from items where type exists in staff for the same id.
SQL: | SELECT salary FROM items AS ikob
WHERE type IN (
SELECT type FROM staff AS xnob
WHERE xnob.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "staff",
"outer_alias": "ikob",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "type",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_02927 | train |
v2 | Schema:
staff (alias: xnob)(name, type, id, amount)
orders(id, type, name, code)
Task: Retrieve id from staff that have at least one corresponding entry in orders sharing the same type.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "orders",
"outer_alias": "xnob",
"inner_alias": "kab",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_02928 | train |
v3 | Schema:
projects (alias: uliv)(code, id, date, salary)
requests(salary, value, name, level)
Task: Find code from projects where salary exceeds the maximum salary from requests for the same code.
SQL: | SELECT code FROM projects AS uliv
WHERE salary > (
SELECT MAX(salary) FROM requests AS ejof
WHERE ejof.code = uliv.code
); | {
"outer_table": "projects",
"inner_table": "requests",
"outer_alias": "uliv",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "uliv.code",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_02929 | train |
v2 | Schema:
employees (alias: bev)(level, code, type, id)
departments(value, level, type, salary)
Task: Retrieve code from employees that have at least one corresponding entry in departments sharing the same code.
SQL: | SELECT code FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02930 | train |
v2 | Schema:
orders (alias: kab)(status, type, id, level)
accounts(status, code, type, name)
Task: Find id from orders where a matching record exists in accounts with the same code.
SQL: | SELECT id FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "accounts",
"outer_alias": "kab",
"inner_alias": "jac",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02931 | train |
v1 | Schema:
branches (alias: agov)(code, value, date, amount)
shipments(salary, level, code, type)
Task: Find salary from branches where id appears in shipments entries with matching id.
SQL: | SELECT salary FROM branches AS agov
WHERE id IN (
SELECT id FROM shipments AS vnob
WHERE vnob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_02932 | train |
v2 | Schema:
shipments (alias: vnob)(name, value, id, salary)
items(level, id, value, date)
Task: Retrieve id from shipments that have at least one corresponding entry in items sharing the same id.
SQL: | SELECT id FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "items",
"outer_alias": "vnob",
"inner_alias": "ikob",
"proj_col": "id",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_02933 | train |
v2 | Schema:
sales (alias: cif)(level, type, salary, status)
customers(type, value, level, status)
Task: Find amount from sales where a matching record exists in customers with the same type.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.type = cif.type
); | {
"outer_table": "sales",
"inner_table": "customers",
"outer_alias": "cif",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "cif.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02934 | train |
v3 | Schema:
branches (alias: agov)(status, type, name, date)
shipments(date, status, salary, code)
Task: Find code from branches where value exceeds the maximum amount from shipments for the same id.
SQL: | SELECT code FROM branches AS agov
WHERE value > (
SELECT MAX(amount) FROM shipments AS vnob
WHERE vnob.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "shipments",
"outer_alias": "agov",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_02935 | train |
v2 | Schema:
requests (alias: ejof)(date, status, type, value)
employees(id, salary, value, date)
Task: Find amount from requests where a matching record exists in employees with the same status.
SQL: | SELECT amount FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "employees",
"outer_alias": "ejof",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_02936 | train |
v3 | Schema:
tasks (alias: znob)(date, code, id, amount)
products(level, type, value, id)
Task: Find id from tasks where amount exceeds the count of amount from products for the same level.
SQL: | SELECT id FROM tasks AS znob
WHERE amount > (
SELECT COUNT(amount) FROM products AS nad
WHERE nad.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_02937 | train |
v2 | Schema:
departments (alias: dov)(amount, id, name, date)
invoices(value, status, salary, name)
Task: Find amount from departments where a matching record exists in invoices with the same level.
SQL: | SELECT amount FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM invoices AS fal
WHERE fal.level = dov.level
); | {
"outer_table": "departments",
"inner_table": "invoices",
"outer_alias": "dov",
"inner_alias": "fal",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "dov.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02938 | train |
v1 | Schema:
sales (alias: cif)(value, date, amount, type)
projects(salary, value, id, type)
Task: Retrieve amount from sales whose status is found in projects rows where id matches the outer record.
SQL: | SELECT amount FROM sales AS cif
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02939 | train |
v2 | Schema:
accounts (alias: jac)(date, level, salary, name)
categories(id, status, type, code)
Task: Retrieve value from accounts that have at least one corresponding entry in categories sharing the same status.
SQL: | SELECT value FROM accounts AS jac
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.status = jac.status
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "jac.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02940 | train |
v2 | Schema:
projects (alias: uliv)(level, status, amount, id)
items(status, level, date, salary)
Task: Find value from projects where a matching record exists in items with the same status.
SQL: | SELECT value FROM projects AS uliv
WHERE EXISTS (
SELECT 1 FROM items AS ikob
WHERE ikob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "items",
"outer_alias": "uliv",
"inner_alias": "ikob",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_02941 | train |
v1 | Schema:
branches (alias: agov)(date, amount, id, level)
accounts(value, status, code, type)
Task: Select salary from branches where level exists in accounts for the same status.
SQL: | SELECT salary FROM branches AS agov
WHERE level IN (
SELECT level FROM accounts AS jac
WHERE jac.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "accounts",
"outer_alias": "agov",
"inner_alias": "jac",
"proj_col": "salary",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_02942 | train |
v1 | Schema:
schedules (alias: vmob)(value, amount, type, date)
items(name, status, amount, value)
Task: Find amount from schedules where status appears in items entries with matching type.
SQL: | SELECT amount FROM schedules AS vmob
WHERE status IN (
SELECT status FROM items AS ikob
WHERE ikob.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "items",
"outer_alias": "vmob",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_02943 | train |
v3 | Schema:
employees (alias: bev)(level, code, date, amount)
branches(level, type, date, code)
Task: Retrieve code from employees with salary above the COUNT(salary) of branches rows sharing the same code.
SQL: | SELECT code FROM employees AS bev
WHERE salary > (
SELECT COUNT(salary) FROM branches AS agov
WHERE agov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "branches",
"outer_alias": "bev",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02944 | train |
v3 | Schema:
requests (alias: ejof)(status, date, id, type)
shipments(salary, value, name, amount)
Task: Find value from requests where salary exceeds the minimum salary from shipments for the same type.
SQL: | SELECT value FROM requests AS ejof
WHERE salary > (
SELECT MIN(salary) FROM shipments AS vnob
WHERE vnob.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "shipments",
"outer_alias": "ejof",
"inner_alias": "vnob",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_02945 | train |
v2 | Schema:
managers (alias: hac)(level, type, value, status)
requests(id, date, value, type)
Task: Find name from managers where a matching record exists in requests with the same level.
SQL: | SELECT name FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "requests",
"outer_alias": "hac",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02946 | train |
v2 | Schema:
transactions (alias: gev)(value, amount, code, name)
products(id, value, level, date)
Task: Find salary from transactions where a matching record exists in products with the same type.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "products",
"outer_alias": "gev",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02947 | train |
v3 | Schema:
managers (alias: hac)(code, date, salary, name)
shipments(status, code, type, amount)
Task: Find salary from managers where amount exceeds the count of value from shipments for the same id.
SQL: | SELECT salary FROM managers AS hac
WHERE amount > (
SELECT COUNT(value) FROM shipments AS vnob
WHERE vnob.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02948 | train |
v3 | Schema:
items (alias: ikob)(code, date, name, value)
products(level, date, name, status)
Task: Find amount from items where salary exceeds the average amount from products for the same status.
SQL: | SELECT amount FROM items AS ikob
WHERE salary > (
SELECT AVG(amount) FROM products AS nad
WHERE nad.status = ikob.status
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "ikob.status",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_02949 | train |
v1 | Schema:
branches (alias: agov)(amount, status, level, value)
categories(date, status, type, amount)
Task: Find name from branches where type appears in categories entries with matching type.
SQL: | SELECT name FROM branches AS agov
WHERE type IN (
SELECT type FROM categories AS egiv
WHERE egiv.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "name",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_02950 | train |
v1 | Schema:
projects (alias: uliv)(name, status, type, amount)
schedules(code, id, value, amount)
Task: Select amount from projects where level exists in schedules for the same status.
SQL: | SELECT amount FROM projects AS uliv
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "schedules",
"outer_alias": "uliv",
"inner_alias": "vmob",
"proj_col": "amount",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_02951 | train |
v1 | Schema:
shipments (alias: vnob)(value, salary, level, status)
staff(name, code, id, type)
Task: Retrieve value from shipments whose status is found in staff rows where code matches the outer record.
SQL: | SELECT value FROM shipments AS vnob
WHERE status IN (
SELECT status FROM staff AS xnob
WHERE xnob.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "staff",
"outer_alias": "vnob",
"inner_alias": "xnob",
"proj_col": "value",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_02952 | train |
v2 | Schema:
schedules (alias: vmob)(date, salary, type, status)
sales(value, amount, status, date)
Task: Retrieve salary from schedules that have at least one corresponding entry in sales sharing the same type.
SQL: | SELECT salary FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_02953 | train |
v3 | Schema:
branches (alias: agov)(type, amount, name, value)
employees(name, salary, type, id)
Task: Retrieve code from branches with value above the MIN(value) of employees rows sharing the same type.
SQL: | SELECT code FROM branches AS agov
WHERE value > (
SELECT MIN(value) FROM employees AS bev
WHERE bev.type = agov.type
); | {
"outer_table": "branches",
"inner_table": "employees",
"outer_alias": "agov",
"inner_alias": "bev",
"proj_col": "code",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "type",
"correlated_ref": "agov.type",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_02954 | train |
v3 | Schema:
categories (alias: egiv)(date, salary, name, level)
employees(level, name, amount, date)
Task: Find name from categories where value exceeds the average salary from employees for the same type.
SQL: | SELECT name FROM categories AS egiv
WHERE value > (
SELECT AVG(salary) FROM employees AS bev
WHERE bev.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "employees",
"outer_alias": "egiv",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_02955 | train |
v1 | Schema:
tasks (alias: znob)(date, name, value, id)
invoices(value, date, salary, status)
Task: Select code from tasks where level exists in invoices for the same id.
SQL: | SELECT code FROM tasks AS znob
WHERE level IN (
SELECT level FROM invoices AS fal
WHERE fal.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "invoices",
"outer_alias": "znob",
"inner_alias": "fal",
"proj_col": "code",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_02956 | train |
v3 | Schema:
orders (alias: kab)(code, type, id, date)
schedules(level, amount, code, id)
Task: Find name from orders where salary exceeds the count of value from schedules for the same status.
SQL: | SELECT name FROM orders AS kab
WHERE salary > (
SELECT COUNT(value) FROM schedules AS vmob
WHERE vmob.status = kab.status
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02957 | train |
v2 | Schema:
products (alias: nad)(code, status, name, id)
departments(type, level, amount, name)
Task: Find value from products where a matching record exists in departments with the same status.
SQL: | SELECT value FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.status = nad.status
); | {
"outer_table": "products",
"inner_table": "departments",
"outer_alias": "nad",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "nad.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02958 | train |
v1 | Schema:
staff (alias: xnob)(amount, value, code, id)
orders(name, salary, id, type)
Task: Retrieve amount from staff whose status is found in orders rows where status matches the outer record.
SQL: | SELECT amount FROM staff AS xnob
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "orders",
"outer_alias": "xnob",
"inner_alias": "kab",
"proj_col": "amount",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_02959 | train |
v2 | Schema:
branches (alias: agov)(level, amount, code, value)
requests(value, level, id, code)
Task: Find name from branches where a matching record exists in requests with the same id.
SQL: | SELECT name FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.id = agov.id
); | {
"outer_table": "branches",
"inner_table": "requests",
"outer_alias": "agov",
"inner_alias": "ejof",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "agov.id",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_02960 | train |
v3 | Schema:
managers (alias: hac)(salary, type, level, amount)
invoices(name, id, date, type)
Task: Find value from managers where value exceeds the total salary from invoices for the same level.
SQL: | SELECT value FROM managers AS hac
WHERE value > (
SELECT SUM(salary) FROM invoices AS fal
WHERE fal.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02961 | train |
v1 | Schema:
staff (alias: xnob)(type, code, level, amount)
categories(amount, id, type, status)
Task: Select salary from staff where id exists in categories for the same status.
SQL: | SELECT salary FROM staff AS xnob
WHERE id IN (
SELECT id FROM categories AS egiv
WHERE egiv.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "categories",
"outer_alias": "xnob",
"inner_alias": "egiv",
"proj_col": "salary",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_02962 | train |
v1 | Schema:
products (alias: nad)(salary, id, level, code)
accounts(id, level, value, status)
Task: Find amount from products where type appears in accounts entries with matching level.
SQL: | SELECT amount FROM products AS nad
WHERE type IN (
SELECT type FROM accounts AS jac
WHERE jac.level = nad.level
); | {
"outer_table": "products",
"inner_table": "accounts",
"outer_alias": "nad",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02963 | train |
v2 | Schema:
departments (alias: dov)(value, level, status, date)
tasks(status, level, salary, code)
Task: Find name from departments where a matching record exists in tasks with the same status.
SQL: | SELECT name FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM tasks AS znob
WHERE znob.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "tasks",
"outer_alias": "dov",
"inner_alias": "znob",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02964 | train |
v1 | Schema:
employees (alias: bev)(salary, code, value, level)
requests(code, type, amount, level)
Task: Retrieve value from employees whose status is found in requests rows where status matches the outer record.
SQL: | SELECT value FROM employees AS bev
WHERE status IN (
SELECT status FROM requests AS ejof
WHERE ejof.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "requests",
"outer_alias": "bev",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02965 | train |
v3 | Schema:
items (alias: ikob)(code, level, type, salary)
projects(salary, name, id, value)
Task: Retrieve id from items with value above the SUM(amount) of projects rows sharing the same type.
SQL: | SELECT id FROM items AS ikob
WHERE value > (
SELECT SUM(amount) FROM projects AS uliv
WHERE uliv.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_02966 | train |
v3 | Schema:
categories (alias: egiv)(salary, id, date, status)
sales(amount, type, value, date)
Task: Find name from categories where value exceeds the count of salary from sales for the same level.
SQL: | SELECT name FROM categories AS egiv
WHERE value > (
SELECT COUNT(salary) FROM sales AS cif
WHERE cif.level = egiv.level
); | {
"outer_table": "categories",
"inner_table": "sales",
"outer_alias": "egiv",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "egiv.level",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_02967 | train |
v3 | Schema:
projects (alias: uliv)(name, code, amount, date)
sales(amount, type, id, name)
Task: Retrieve name from projects with amount above the COUNT(salary) of sales rows sharing the same type.
SQL: | SELECT name FROM projects AS uliv
WHERE amount > (
SELECT COUNT(salary) FROM sales AS cif
WHERE cif.type = uliv.type
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "uliv.type",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_02968 | train |
v2 | Schema:
branches (alias: agov)(name, level, status, code)
transactions(code, name, value, level)
Task: Find id from branches where a matching record exists in transactions with the same status.
SQL: | SELECT id 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": "id",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_02969 | train |
v2 | Schema:
transactions (alias: gev)(code, name, level, salary)
sales(id, value, amount, type)
Task: Find salary from transactions where a matching record exists in sales with the same id.
SQL: | SELECT salary FROM transactions AS gev
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.id = gev.id
); | {
"outer_table": "transactions",
"inner_table": "sales",
"outer_alias": "gev",
"inner_alias": "cif",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "gev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02970 | train |
v3 | Schema:
tasks (alias: znob)(amount, code, name, date)
projects(id, status, salary, name)
Task: Find name from tasks where amount exceeds the average salary from projects for the same code.
SQL: | SELECT name FROM tasks AS znob
WHERE amount > (
SELECT AVG(salary) FROM projects AS uliv
WHERE uliv.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "projects",
"outer_alias": "znob",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_02971 | train |
v2 | Schema:
managers (alias: hac)(date, type, level, salary)
products(status, code, type, date)
Task: Retrieve value from managers that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "products",
"outer_alias": "hac",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02972 | train |
v1 | Schema:
tasks (alias: znob)(date, value, id, code)
sales(type, date, amount, value)
Task: Select id from tasks where code exists in sales for the same level.
SQL: | SELECT id FROM tasks AS znob
WHERE code IN (
SELECT code FROM sales AS cif
WHERE cif.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "sales",
"outer_alias": "znob",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "code",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_02973 | train |
v2 | Schema:
departments (alias: dov)(amount, status, id, code)
branches(status, amount, level, code)
Task: Retrieve code from departments that have at least one corresponding entry in branches sharing the same id.
SQL: | SELECT code FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02974 | train |
v3 | Schema:
orders (alias: kab)(code, amount, status, name)
transactions(id, value, level, type)
Task: Retrieve code from orders with amount above the COUNT(amount) of transactions rows sharing the same level.
SQL: | SELECT code FROM orders AS kab
WHERE amount > (
SELECT COUNT(amount) FROM transactions AS gev
WHERE gev.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "transactions",
"outer_alias": "kab",
"inner_alias": "gev",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02975 | train |
v3 | Schema:
managers (alias: hac)(date, level, code, salary)
customers(amount, level, value, name)
Task: Find id from managers where amount exceeds the total value from customers for the same type.
SQL: | SELECT id FROM managers AS hac
WHERE amount > (
SELECT SUM(value) FROM customers AS lex
WHERE lex.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "customers",
"outer_alias": "hac",
"inner_alias": "lex",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02976 | train |
v2 | Schema:
employees (alias: bev)(date, id, status, amount)
customers(status, salary, date, amount)
Task: Retrieve amount from employees that have at least one corresponding entry in customers sharing the same id.
SQL: | SELECT amount FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.id = bev.id
); | {
"outer_table": "employees",
"inner_table": "customers",
"outer_alias": "bev",
"inner_alias": "lex",
"proj_col": "amount",
"join_col": "id",
"correlated_ref": "bev.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02977 | train |
v3 | Schema:
requests (alias: ejof)(value, status, salary, level)
sales(level, value, code, amount)
Task: Find code from requests where value exceeds the minimum amount from sales for the same level.
SQL: | SELECT code FROM requests AS ejof
WHERE value > (
SELECT MIN(amount) FROM sales AS cif
WHERE cif.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_02978 | train |
v1 | Schema:
tasks (alias: znob)(value, salary, status, code)
orders(date, level, name, code)
Task: Retrieve code from tasks whose code is found in orders rows where id matches the outer record.
SQL: | SELECT code FROM tasks AS znob
WHERE code IN (
SELECT code FROM orders AS kab
WHERE kab.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_02979 | train |
v1 | Schema:
requests (alias: ejof)(type, salary, status, code)
transactions(code, value, amount, id)
Task: Find value from requests where code appears in transactions entries with matching type.
SQL: | SELECT value FROM requests AS ejof
WHERE code IN (
SELECT code FROM transactions AS gev
WHERE gev.type = ejof.type
); | {
"outer_table": "requests",
"inner_table": "transactions",
"outer_alias": "ejof",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "ejof.type",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_02980 | train |
v2 | Schema:
orders (alias: kab)(salary, date, name, type)
categories(type, amount, status, value)
Task: Find code from orders where a matching record exists in categories with the same level.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM categories AS egiv
WHERE egiv.level = kab.level
); | {
"outer_table": "orders",
"inner_table": "categories",
"outer_alias": "kab",
"inner_alias": "egiv",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "kab.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02981 | train |
v2 | Schema:
items (alias: ikob)(code, level, id, status)
shipments(salary, date, amount, name)
Task: Find amount from items where a matching record exists in shipments with the same code.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.code = ikob.code
); | {
"outer_table": "items",
"inner_table": "shipments",
"outer_alias": "ikob",
"inner_alias": "vnob",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "ikob.code",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_02982 | train |
v2 | Schema:
managers (alias: hac)(salary, status, type, amount)
projects(salary, amount, value, code)
Task: Retrieve amount from managers that have at least one corresponding entry in projects sharing the same type.
SQL: | SELECT amount FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "projects",
"outer_alias": "hac",
"inner_alias": "uliv",
"proj_col": "amount",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02983 | train |
v1 | Schema:
managers (alias: hac)(value, code, id, amount)
invoices(type, code, level, date)
Task: Select amount from managers where status exists in invoices for the same code.
SQL: | SELECT amount FROM managers AS hac
WHERE status IN (
SELECT status FROM invoices AS fal
WHERE fal.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "invoices",
"outer_alias": "hac",
"inner_alias": "fal",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02984 | train |
v3 | Schema:
managers (alias: hac)(level, amount, id, date)
orders(level, amount, status, id)
Task: Find code from managers where amount exceeds the maximum value from orders for the same code.
SQL: | SELECT code FROM managers AS hac
WHERE amount > (
SELECT MAX(value) FROM orders AS kab
WHERE kab.code = hac.code
); | {
"outer_table": "managers",
"inner_table": "orders",
"outer_alias": "hac",
"inner_alias": "kab",
"proj_col": "code",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "hac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02985 | train |
v1 | Schema:
invoices (alias: fal)(name, type, id, amount)
managers(type, level, code, salary)
Task: Select name from invoices where code exists in managers for the same status.
SQL: | SELECT name FROM invoices AS fal
WHERE code IN (
SELECT code 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": "code",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02986 | train |
v3 | Schema:
branches (alias: agov)(name, code, date, level)
categories(name, salary, date, status)
Task: Retrieve amount from branches with salary above the COUNT(amount) of categories rows sharing the same level.
SQL: | SELECT amount FROM branches AS agov
WHERE salary > (
SELECT COUNT(amount) FROM categories AS egiv
WHERE egiv.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "categories",
"outer_alias": "agov",
"inner_alias": "egiv",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_02987 | train |
v1 | Schema:
items (alias: ikob)(amount, date, level, code)
customers(type, code, value, name)
Task: Retrieve amount from items whose id is found in customers rows where level matches the outer record.
SQL: | SELECT amount FROM items AS ikob
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "customers",
"outer_alias": "ikob",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_02988 | train |
v3 | Schema:
branches (alias: agov)(name, code, amount, value)
invoices(date, code, salary, level)
Task: Find id from branches where amount exceeds the total amount from invoices for the same status.
SQL: | SELECT id FROM branches AS agov
WHERE amount > (
SELECT SUM(amount) FROM invoices AS fal
WHERE fal.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "invoices",
"outer_alias": "agov",
"inner_alias": "fal",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_02989 | train |
v1 | Schema:
staff (alias: xnob)(amount, date, id, salary)
employees(id, value, date, level)
Task: Select amount from staff where status exists in employees for the same code.
SQL: | SELECT amount FROM staff AS xnob
WHERE status IN (
SELECT status FROM employees AS bev
WHERE bev.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "employees",
"outer_alias": "xnob",
"inner_alias": "bev",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_02990 | train |
v2 | Schema:
staff (alias: xnob)(value, status, id, name)
projects(date, name, amount, type)
Task: Find id from staff where a matching record exists in projects with the same code.
SQL: | SELECT id FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "projects",
"outer_alias": "xnob",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_02991 | train |
v2 | Schema:
regions (alias: okiv)(code, amount, date, salary)
customers(type, status, value, code)
Task: Retrieve id from regions that have at least one corresponding entry in customers sharing the same status.
SQL: | SELECT id FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM customers AS lex
WHERE lex.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "customers",
"outer_alias": "okiv",
"inner_alias": "lex",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_02992 | train |
v3 | Schema:
categories (alias: egiv)(amount, type, id, name)
products(status, amount, date, code)
Task: Retrieve code from categories with value above the MIN(salary) of products rows sharing the same status.
SQL: | SELECT code FROM categories AS egiv
WHERE value > (
SELECT MIN(salary) FROM products AS nad
WHERE nad.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "products",
"outer_alias": "egiv",
"inner_alias": "nad",
"proj_col": "code",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_02993 | train |
v1 | Schema:
sales (alias: cif)(name, code, status, type)
employees(type, name, date, code)
Task: Find value from sales where id appears in employees entries with matching status.
SQL: | SELECT value FROM sales AS cif
WHERE id IN (
SELECT id FROM employees AS bev
WHERE bev.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02994 | train |
v2 | Schema:
schedules (alias: vmob)(name, date, value, salary)
products(code, name, status, value)
Task: Retrieve value from schedules that have at least one corresponding entry in products sharing the same level.
SQL: | SELECT value FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_02995 | train |
v2 | Schema:
managers (alias: hac)(status, code, level, date)
employees(level, value, date, salary)
Task: Retrieve code from managers that have at least one corresponding entry in employees sharing the same id.
SQL: | SELECT code FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = hac.id
); | {
"outer_table": "managers",
"inner_table": "employees",
"outer_alias": "hac",
"inner_alias": "bev",
"proj_col": "code",
"join_col": "id",
"correlated_ref": "hac.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02996 | train |
v2 | Schema:
invoices (alias: fal)(level, name, code, id)
schedules(salary, value, name, id)
Task: Find code from invoices where a matching record exists in schedules with the same level.
SQL: | SELECT code FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.level = fal.level
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "level",
"correlated_ref": "fal.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02997 | train |
v3 | Schema:
tasks (alias: znob)(status, level, date, amount)
transactions(value, salary, level, id)
Task: Retrieve value from tasks with amount above the SUM(salary) of transactions rows sharing the same code.
SQL: | SELECT value FROM tasks AS znob
WHERE amount > (
SELECT SUM(salary) FROM transactions AS gev
WHERE gev.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "transactions",
"outer_alias": "znob",
"inner_alias": "gev",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "SUM",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_02998 | train |
v2 | Schema:
orders (alias: kab)(amount, date, value, salary)
projects(id, name, code, level)
Task: Retrieve name from orders that have at least one corresponding entry in projects sharing the same id.
SQL: | SELECT name FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "projects",
"outer_alias": "kab",
"inner_alias": "uliv",
"proj_col": "name",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_02999 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.