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:
staff (alias: xnob)(name, status, date, amount)
shipments(status, code, id, amount)
Task: Select amount from staff where status exists in shipments for the same code.
SQL: | SELECT amount FROM staff AS xnob
WHERE status IN (
SELECT status FROM shipments AS vnob
WHERE vnob.code = xnob.code
); | {
"outer_table": "staff",
"inner_table": "shipments",
"outer_alias": "xnob",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "status",
"join_col": "code",
"correlated_ref": "xnob.code",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01400 | train |
v3 | Schema:
customers (alias: lex)(date, value, salary, type)
orders(amount, salary, id, type)
Task: Retrieve id from customers with salary above the MIN(salary) of orders rows sharing the same code.
SQL: | SELECT id FROM customers AS lex
WHERE salary > (
SELECT MIN(salary) FROM orders AS kab
WHERE kab.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "orders",
"outer_alias": "lex",
"inner_alias": "kab",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01401 | train |
v2 | Schema:
shipments (alias: vnob)(salary, date, id, amount)
departments(name, id, amount, salary)
Task: Find value from shipments where a matching record exists in departments with the same code.
SQL: | SELECT value FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "departments",
"outer_alias": "vnob",
"inner_alias": "dov",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01402 | train |
v3 | Schema:
projects (alias: uliv)(id, type, date, amount)
shipments(name, date, code, status)
Task: Retrieve code from projects with value above the SUM(amount) of shipments rows sharing the same level.
SQL: | SELECT code FROM projects AS uliv
WHERE value > (
SELECT SUM(amount) FROM shipments AS vnob
WHERE vnob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "shipments",
"outer_alias": "uliv",
"inner_alias": "vnob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01403 | train |
v3 | Schema:
items (alias: ikob)(salary, id, date, value)
employees(date, name, salary, status)
Task: Find id from items where value exceeds the count of value from employees for the same type.
SQL: | SELECT id FROM items AS ikob
WHERE value > (
SELECT COUNT(value) FROM employees AS bev
WHERE bev.type = ikob.type
); | {
"outer_table": "items",
"inner_table": "employees",
"outer_alias": "ikob",
"inner_alias": "bev",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "ikob.type",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01404 | train |
v3 | Schema:
projects (alias: uliv)(name, amount, value, code)
sales(id, code, status, type)
Task: Find id from projects where value exceeds the average value from sales for the same status.
SQL: | SELECT id FROM projects AS uliv
WHERE value > (
SELECT AVG(value) FROM sales AS cif
WHERE cif.status = uliv.status
); | {
"outer_table": "projects",
"inner_table": "sales",
"outer_alias": "uliv",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "uliv.status",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01405 | train |
v2 | Schema:
tasks (alias: znob)(date, value, status, type)
employees(type, value, code, level)
Task: Retrieve value from tasks that have at least one corresponding entry in employees sharing the same id.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "employees",
"outer_alias": "znob",
"inner_alias": "bev",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01406 | train |
v3 | Schema:
employees (alias: bev)(amount, type, id, level)
staff(status, value, type, amount)
Task: Find id from employees where value exceeds the average salary from staff for the same code.
SQL: | SELECT id FROM employees AS bev
WHERE value > (
SELECT AVG(salary) FROM staff AS xnob
WHERE xnob.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "staff",
"outer_alias": "bev",
"inner_alias": "xnob",
"proj_col": "id",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01407 | train |
v3 | Schema:
employees (alias: bev)(type, level, id, salary)
departments(code, date, status, type)
Task: Retrieve salary from employees with amount above the AVG(value) of departments rows sharing the same code.
SQL: | SELECT salary FROM employees AS bev
WHERE amount > (
SELECT AVG(value) FROM departments AS dov
WHERE dov.code = bev.code
); | {
"outer_table": "employees",
"inner_table": "departments",
"outer_alias": "bev",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "code",
"correlated_ref": "bev.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01408 | train |
v1 | Schema:
regions (alias: okiv)(id, value, amount, name)
orders(amount, id, code, value)
Task: Select salary from regions where id exists in orders for the same id.
SQL: | SELECT salary FROM regions AS okiv
WHERE id IN (
SELECT id FROM orders AS kab
WHERE kab.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "orders",
"outer_alias": "okiv",
"inner_alias": "kab",
"proj_col": "salary",
"filter_col": "id",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01409 | train |
v2 | Schema:
tasks (alias: znob)(amount, value, status, salary)
orders(date, name, salary, code)
Task: Find value from tasks where a matching record exists in orders with the same id.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = znob.id
); | {
"outer_table": "tasks",
"inner_table": "orders",
"outer_alias": "znob",
"inner_alias": "kab",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "znob.id",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01410 | train |
v2 | Schema:
managers (alias: hac)(code, status, date, type)
requests(status, type, name, id)
Task: Find code from managers where a matching record exists in requests with the same level.
SQL: | SELECT code 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": "code",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01411 | train |
v1 | Schema:
requests (alias: ejof)(code, id, level, date)
projects(type, salary, status, value)
Task: Select value from requests where id exists in projects for the same level.
SQL: | SELECT value FROM requests AS ejof
WHERE id IN (
SELECT id FROM projects AS uliv
WHERE uliv.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "projects",
"outer_alias": "ejof",
"inner_alias": "uliv",
"proj_col": "value",
"filter_col": "id",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01412 | train |
v2 | Schema:
shipments (alias: vnob)(id, status, date, type)
products(level, status, salary, name)
Task: Find amount from shipments where a matching record exists in products with the same status.
SQL: | SELECT amount FROM shipments AS vnob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.status = vnob.status
); | {
"outer_table": "shipments",
"inner_table": "products",
"outer_alias": "vnob",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "vnob.status",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01413 | train |
v2 | Schema:
departments (alias: dov)(amount, code, type, name)
branches(date, type, id, level)
Task: Retrieve id from departments that have at least one corresponding entry in branches sharing the same status.
SQL: | SELECT id FROM departments AS dov
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "branches",
"outer_alias": "dov",
"inner_alias": "agov",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01414 | train |
v3 | Schema:
products (alias: nad)(amount, level, type, status)
categories(type, value, code, id)
Task: Retrieve id from products with amount above the AVG(salary) of categories rows sharing the same level.
SQL: | SELECT id FROM products AS nad
WHERE amount > (
SELECT AVG(salary) FROM categories AS egiv
WHERE egiv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "categories",
"outer_alias": "nad",
"inner_alias": "egiv",
"proj_col": "id",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01415 | train |
v2 | Schema:
managers (alias: hac)(code, salary, status, date)
transactions(type, status, value, level)
Task: Retrieve id from managers that have at least one corresponding entry in transactions sharing the same type.
SQL: | SELECT id FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "transactions",
"outer_alias": "hac",
"inner_alias": "gev",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01416 | train |
v3 | Schema:
customers (alias: lex)(amount, salary, id, type)
sales(value, name, code, level)
Task: Retrieve amount from customers with salary above the MIN(salary) of sales rows sharing the same status.
SQL: | SELECT amount FROM customers AS lex
WHERE salary > (
SELECT MIN(salary) FROM sales AS cif
WHERE cif.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01417 | train |
v3 | Schema:
orders (alias: kab)(value, name, id, amount)
managers(amount, code, id, level)
Task: Find value from orders where salary exceeds the count of amount from managers for the same code.
SQL: | SELECT value FROM orders AS kab
WHERE salary > (
SELECT COUNT(amount) FROM managers AS hac
WHERE hac.code = kab.code
); | {
"outer_table": "orders",
"inner_table": "managers",
"outer_alias": "kab",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "kab.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01418 | train |
v1 | Schema:
categories (alias: egiv)(amount, type, name, salary)
requests(level, amount, id, code)
Task: Find name from categories where type appears in requests entries with matching code.
SQL: | SELECT name FROM categories AS egiv
WHERE type IN (
SELECT type FROM requests AS ejof
WHERE ejof.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "requests",
"outer_alias": "egiv",
"inner_alias": "ejof",
"proj_col": "name",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01419 | train |
v3 | Schema:
shipments (alias: vnob)(id, salary, status, value)
transactions(name, value, salary, code)
Task: Find salary from shipments where value exceeds the maximum value from transactions for the same code.
SQL: | SELECT salary FROM shipments AS vnob
WHERE value > (
SELECT MAX(value) FROM transactions AS gev
WHERE gev.code = vnob.code
); | {
"outer_table": "shipments",
"inner_table": "transactions",
"outer_alias": "vnob",
"inner_alias": "gev",
"proj_col": "salary",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "vnob.code",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01420 | train |
v1 | Schema:
categories (alias: egiv)(type, amount, status, code)
orders(id, date, level, amount)
Task: Find value from categories where status appears in orders entries with matching status.
SQL: | SELECT value FROM categories AS egiv
WHERE status IN (
SELECT status FROM orders AS kab
WHERE kab.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "orders",
"outer_alias": "egiv",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "status",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01421 | train |
v2 | Schema:
categories (alias: egiv)(date, amount, value, salary)
transactions(level, code, id, status)
Task: Find salary from categories where a matching record exists in transactions with the same type.
SQL: | SELECT salary FROM categories AS egiv
WHERE EXISTS (
SELECT 1 FROM transactions AS gev
WHERE gev.type = egiv.type
); | {
"outer_table": "categories",
"inner_table": "transactions",
"outer_alias": "egiv",
"inner_alias": "gev",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "egiv.type",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01422 | train |
v1 | Schema:
invoices (alias: fal)(amount, type, status, name)
schedules(amount, name, date, id)
Task: Retrieve id from invoices whose level is found in schedules rows where status matches the outer record.
SQL: | SELECT id FROM invoices AS fal
WHERE level IN (
SELECT level FROM schedules AS vmob
WHERE vmob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "schedules",
"outer_alias": "fal",
"inner_alias": "vmob",
"proj_col": "id",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01423 | train |
v1 | Schema:
tasks (alias: znob)(level, date, status, value)
projects(value, type, id, code)
Task: Find amount from tasks where status appears in projects entries with matching type.
SQL: | SELECT amount FROM tasks AS znob
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "projects",
"outer_alias": "znob",
"inner_alias": "uliv",
"proj_col": "amount",
"filter_col": "status",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01424 | train |
v3 | Schema:
shipments (alias: vnob)(amount, status, value, level)
customers(date, value, type, name)
Task: Find amount from shipments where salary exceeds the count of salary from customers for the same type.
SQL: | SELECT amount FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(salary) FROM customers AS lex
WHERE lex.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "customers",
"outer_alias": "vnob",
"inner_alias": "lex",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01425 | train |
v3 | Schema:
invoices (alias: fal)(type, amount, date, name)
staff(amount, name, id, salary)
Task: Find amount from invoices where value exceeds the total amount from staff for the same id.
SQL: | SELECT amount FROM invoices AS fal
WHERE value > (
SELECT SUM(amount) FROM staff AS xnob
WHERE xnob.id = fal.id
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "fal.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01426 | train |
v2 | Schema:
managers (alias: hac)(code, salary, status, date)
staff(status, id, value, code)
Task: Find value from managers where a matching record exists in staff with the same level.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.level = hac.level
); | {
"outer_table": "managers",
"inner_table": "staff",
"outer_alias": "hac",
"inner_alias": "xnob",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "hac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01427 | train |
v3 | Schema:
orders (alias: kab)(date, status, id, code)
employees(date, salary, id, type)
Task: Retrieve salary from orders with salary above the COUNT(value) of employees rows sharing the same id.
SQL: | SELECT salary FROM orders AS kab
WHERE salary > (
SELECT COUNT(value) FROM employees AS bev
WHERE bev.id = kab.id
); | {
"outer_table": "orders",
"inner_table": "employees",
"outer_alias": "kab",
"inner_alias": "bev",
"proj_col": "salary",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "kab.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01428 | train |
v1 | Schema:
products (alias: nad)(amount, value, code, date)
tasks(name, date, status, type)
Task: Select code from products where type exists in tasks for the same code.
SQL: | SELECT code FROM products AS nad
WHERE type IN (
SELECT type FROM tasks AS znob
WHERE znob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "tasks",
"outer_alias": "nad",
"inner_alias": "znob",
"proj_col": "code",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01429 | train |
v1 | Schema:
shipments (alias: vnob)(salary, status, code, type)
requests(level, id, code, name)
Task: Find code from shipments where level appears in requests entries with matching level.
SQL: | SELECT code FROM shipments AS vnob
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.level = vnob.level
); | {
"outer_table": "shipments",
"inner_table": "requests",
"outer_alias": "vnob",
"inner_alias": "ejof",
"proj_col": "code",
"filter_col": "level",
"join_col": "level",
"correlated_ref": "vnob.level",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01430 | train |
v2 | Schema:
items (alias: ikob)(date, type, name, status)
products(date, salary, type, name)
Task: Find amount from items where a matching record exists in products with the same level.
SQL: | SELECT amount FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "products",
"outer_alias": "ikob",
"inner_alias": "nad",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01431 | train |
v3 | Schema:
branches (alias: agov)(salary, name, id, amount)
schedules(amount, type, level, salary)
Task: Retrieve name from branches with value above the AVG(amount) of schedules rows sharing the same status.
SQL: | SELECT name FROM branches AS agov
WHERE value > (
SELECT AVG(amount) FROM schedules AS vmob
WHERE vmob.status = agov.status
); | {
"outer_table": "branches",
"inner_table": "schedules",
"outer_alias": "agov",
"inner_alias": "vmob",
"proj_col": "name",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "agov.status",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01432 | train |
v1 | Schema:
transactions (alias: gev)(name, amount, value, type)
shipments(status, id, salary, name)
Task: Retrieve amount from transactions whose type is found in shipments rows where type matches the outer record.
SQL: | SELECT amount FROM transactions AS gev
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.type = gev.type
); | {
"outer_table": "transactions",
"inner_table": "shipments",
"outer_alias": "gev",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "gev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01433 | train |
v3 | Schema:
regions (alias: okiv)(value, id, salary, status)
employees(date, value, salary, type)
Task: Retrieve value from regions with amount above the AVG(salary) of employees rows sharing the same type.
SQL: | SELECT value FROM regions AS okiv
WHERE amount > (
SELECT AVG(salary) FROM employees AS bev
WHERE bev.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "employees",
"outer_alias": "okiv",
"inner_alias": "bev",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01434 | train |
v3 | Schema:
sales (alias: cif)(type, amount, value, date)
employees(value, date, name, type)
Task: Find name from sales where amount exceeds the maximum amount from employees for the same status.
SQL: | SELECT name FROM sales AS cif
WHERE amount > (
SELECT MAX(amount) FROM employees AS bev
WHERE bev.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "employees",
"outer_alias": "cif",
"inner_alias": "bev",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01435 | train |
v1 | Schema:
staff (alias: xnob)(id, name, status, value)
departments(status, salary, value, code)
Task: Select salary from staff where type exists in departments for the same type.
SQL: | SELECT salary FROM staff AS xnob
WHERE type IN (
SELECT type FROM departments AS dov
WHERE dov.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "salary",
"filter_col": "type",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01436 | train |
v3 | Schema:
departments (alias: dov)(name, level, value, type)
regions(salary, id, status, code)
Task: Retrieve amount from departments with value above the MAX(salary) of regions rows sharing the same id.
SQL: | SELECT amount FROM departments AS dov
WHERE value > (
SELECT MAX(salary) FROM regions AS okiv
WHERE okiv.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01437 | train |
v3 | Schema:
customers (alias: lex)(amount, date, id, value)
staff(amount, type, code, salary)
Task: Retrieve salary from customers with amount above the MIN(amount) of staff rows sharing the same code.
SQL: | SELECT salary FROM customers AS lex
WHERE amount > (
SELECT MIN(amount) FROM staff AS xnob
WHERE xnob.code = lex.code
); | {
"outer_table": "customers",
"inner_table": "staff",
"outer_alias": "lex",
"inner_alias": "xnob",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "code",
"correlated_ref": "lex.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01438 | train |
v1 | Schema:
regions (alias: okiv)(id, name, type, date)
departments(code, type, level, amount)
Task: Retrieve name from regions whose status is found in departments rows where id matches the outer record.
SQL: | SELECT name FROM regions AS okiv
WHERE status IN (
SELECT status FROM departments AS dov
WHERE dov.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "departments",
"outer_alias": "okiv",
"inner_alias": "dov",
"proj_col": "name",
"filter_col": "status",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01439 | train |
v1 | Schema:
staff (alias: xnob)(salary, value, code, level)
products(status, code, type, level)
Task: Find name from staff where level appears in products entries with matching id.
SQL: | SELECT name FROM staff AS xnob
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "products",
"outer_alias": "xnob",
"inner_alias": "nad",
"proj_col": "name",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01440 | train |
v3 | Schema:
invoices (alias: fal)(value, salary, code, name)
staff(salary, value, amount, level)
Task: Retrieve code from invoices with value above the SUM(amount) of staff rows sharing the same status.
SQL: | SELECT code FROM invoices AS fal
WHERE value > (
SELECT SUM(amount) FROM staff AS xnob
WHERE xnob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "code",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01441 | train |
v1 | Schema:
shipments (alias: vnob)(status, type, amount, id)
tasks(name, salary, code, id)
Task: Find name from shipments where level appears in tasks entries with matching type.
SQL: | SELECT name FROM shipments AS vnob
WHERE level IN (
SELECT level FROM tasks AS znob
WHERE znob.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "tasks",
"outer_alias": "vnob",
"inner_alias": "znob",
"proj_col": "name",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01442 | train |
v2 | Schema:
tasks (alias: znob)(value, code, name, id)
branches(date, code, level, salary)
Task: Find value from tasks where a matching record exists in branches with the same status.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.status = znob.status
); | {
"outer_table": "tasks",
"inner_table": "branches",
"outer_alias": "znob",
"inner_alias": "agov",
"proj_col": "value",
"join_col": "status",
"correlated_ref": "znob.status",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01443 | train |
v2 | Schema:
tasks (alias: znob)(status, value, amount, salary)
products(salary, date, level, type)
Task: Retrieve name from tasks that have at least one corresponding entry in products sharing the same code.
SQL: | SELECT name FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01444 | train |
v3 | Schema:
requests (alias: ejof)(amount, value, code, type)
items(amount, type, code, status)
Task: Retrieve amount from requests with value above the AVG(value) of items rows sharing the same level.
SQL: | SELECT amount FROM requests AS ejof
WHERE value > (
SELECT AVG(value) FROM items AS ikob
WHERE ikob.level = ejof.level
); | {
"outer_table": "requests",
"inner_table": "items",
"outer_alias": "ejof",
"inner_alias": "ikob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "ejof.level",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01445 | train |
v2 | Schema:
schedules (alias: vmob)(date, name, status, level)
products(amount, id, date, level)
Task: Retrieve code from schedules that have at least one corresponding entry in products sharing the same type.
SQL: | SELECT code FROM schedules AS vmob
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01446 | train |
v1 | Schema:
departments (alias: dov)(status, value, id, amount)
regions(amount, name, code, date)
Task: Find name from departments where type appears in regions entries with matching status.
SQL: | SELECT name FROM departments AS dov
WHERE type IN (
SELECT type FROM regions AS okiv
WHERE okiv.status = dov.status
); | {
"outer_table": "departments",
"inner_table": "regions",
"outer_alias": "dov",
"inner_alias": "okiv",
"proj_col": "name",
"filter_col": "type",
"join_col": "status",
"correlated_ref": "dov.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01447 | train |
v3 | Schema:
projects (alias: uliv)(code, date, amount, status)
shipments(salary, level, id, name)
Task: Find amount from projects where amount exceeds the count of value from shipments for the same level.
SQL: | SELECT amount FROM projects AS uliv
WHERE amount > (
SELECT COUNT(value) FROM shipments AS vnob
WHERE vnob.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "shipments",
"outer_alias": "uliv",
"inner_alias": "vnob",
"proj_col": "amount",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01448 | train |
v2 | Schema:
staff (alias: xnob)(status, salary, date, id)
departments(status, amount, date, salary)
Task: Find code from staff where a matching record exists in departments with the same type.
SQL: | SELECT code FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM departments AS dov
WHERE dov.type = xnob.type
); | {
"outer_table": "staff",
"inner_table": "departments",
"outer_alias": "xnob",
"inner_alias": "dov",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "xnob.type",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01449 | train |
v3 | Schema:
tasks (alias: znob)(amount, status, level, date)
products(name, status, value, salary)
Task: Retrieve value from tasks with amount above the MIN(amount) of products rows sharing the same level.
SQL: | SELECT value FROM tasks AS znob
WHERE amount > (
SELECT MIN(amount) FROM products AS nad
WHERE nad.level = znob.level
); | {
"outer_table": "tasks",
"inner_table": "products",
"outer_alias": "znob",
"inner_alias": "nad",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "level",
"correlated_ref": "znob.level",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01450 | train |
v1 | Schema:
sales (alias: cif)(amount, type, code, name)
requests(date, type, status, name)
Task: Select value from sales where level exists in requests for the same id.
SQL: | SELECT value FROM sales AS cif
WHERE level IN (
SELECT level FROM requests AS ejof
WHERE ejof.id = cif.id
); | {
"outer_table": "sales",
"inner_table": "requests",
"outer_alias": "cif",
"inner_alias": "ejof",
"proj_col": "value",
"filter_col": "level",
"join_col": "id",
"correlated_ref": "cif.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01451 | train |
v1 | Schema:
regions (alias: okiv)(value, code, salary, date)
branches(code, name, level, status)
Task: Retrieve code from regions whose code is found in branches rows where type matches the outer record.
SQL: | SELECT code FROM regions AS okiv
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "code",
"filter_col": "code",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01452 | train |
v2 | Schema:
customers (alias: lex)(level, type, salary, status)
projects(salary, code, type, amount)
Task: Retrieve id from customers that have at least one corresponding entry in projects sharing the same status.
SQL: | SELECT id FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.status = lex.status
); | {
"outer_table": "customers",
"inner_table": "projects",
"outer_alias": "lex",
"inner_alias": "uliv",
"proj_col": "id",
"join_col": "status",
"correlated_ref": "lex.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01453 | train |
v3 | Schema:
departments (alias: dov)(date, status, type, level)
staff(type, code, level, status)
Task: Find amount from departments where value exceeds the total amount from staff for the same id.
SQL: | SELECT amount FROM departments AS dov
WHERE value > (
SELECT SUM(amount) FROM staff AS xnob
WHERE xnob.id = dov.id
); | {
"outer_table": "departments",
"inner_table": "staff",
"outer_alias": "dov",
"inner_alias": "xnob",
"proj_col": "amount",
"filter_col": "value",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "id",
"correlated_ref": "dov.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01454 | train |
v2 | Schema:
customers (alias: lex)(salary, type, amount, value)
regions(value, salary, status, id)
Task: Find salary from customers where a matching record exists in regions with the same id.
SQL: | SELECT salary FROM customers AS lex
WHERE EXISTS (
SELECT 1 FROM regions AS okiv
WHERE okiv.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "regions",
"outer_alias": "lex",
"inner_alias": "okiv",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01455 | train |
v3 | Schema:
projects (alias: uliv)(amount, type, value, level)
accounts(name, amount, code, id)
Task: Retrieve value from projects with value above the MAX(salary) of accounts rows sharing the same level.
SQL: | SELECT value FROM projects AS uliv
WHERE value > (
SELECT MAX(salary) FROM accounts AS jac
WHERE jac.level = uliv.level
); | {
"outer_table": "projects",
"inner_table": "accounts",
"outer_alias": "uliv",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "level",
"correlated_ref": "uliv.level",
"token_group": "T2",
"fan_out": 65
} | T2 | cs9_fixed_v1_train_01456 | train |
v2 | Schema:
invoices (alias: fal)(id, salary, status, value)
employees(level, salary, value, id)
Task: Find amount from invoices where a matching record exists in employees with the same status.
SQL: | SELECT amount FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM employees AS bev
WHERE bev.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "employees",
"outer_alias": "fal",
"inner_alias": "bev",
"proj_col": "amount",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01457 | train |
v3 | Schema:
customers (alias: lex)(date, id, value, status)
branches(value, status, type, code)
Task: Retrieve value from customers with amount above the AVG(amount) of branches rows sharing the same id.
SQL: | SELECT value FROM customers AS lex
WHERE amount > (
SELECT AVG(amount) FROM branches AS agov
WHERE agov.id = lex.id
); | {
"outer_table": "customers",
"inner_table": "branches",
"outer_alias": "lex",
"inner_alias": "agov",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "id",
"correlated_ref": "lex.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01458 | train |
v3 | Schema:
regions (alias: okiv)(date, id, name, value)
branches(amount, salary, type, code)
Task: Retrieve amount from regions with salary above the MIN(salary) of branches rows sharing the same id.
SQL: | SELECT amount FROM regions AS okiv
WHERE salary > (
SELECT MIN(salary) FROM branches AS agov
WHERE agov.id = okiv.id
); | {
"outer_table": "regions",
"inner_table": "branches",
"outer_alias": "okiv",
"inner_alias": "agov",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "salary",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "okiv.id",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01459 | train |
v3 | Schema:
shipments (alias: vnob)(amount, id, date, status)
projects(type, name, code, value)
Task: Find id from shipments where salary exceeds the count of amount from projects for the same type.
SQL: | SELECT id FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(amount) FROM projects AS uliv
WHERE uliv.type = vnob.type
); | {
"outer_table": "shipments",
"inner_table": "projects",
"outer_alias": "vnob",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "type",
"correlated_ref": "vnob.type",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01460 | train |
v3 | Schema:
accounts (alias: jac)(value, name, date, status)
categories(level, status, salary, type)
Task: Retrieve value from accounts with amount above the MAX(salary) of categories rows sharing the same code.
SQL: | SELECT value FROM accounts AS jac
WHERE amount > (
SELECT MAX(salary) FROM categories AS egiv
WHERE egiv.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "categories",
"outer_alias": "jac",
"inner_alias": "egiv",
"proj_col": "value",
"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_01461 | train |
v2 | Schema:
tasks (alias: znob)(code, name, id, salary)
accounts(amount, date, code, name)
Task: Find value from tasks where a matching record exists in accounts with the same code.
SQL: | SELECT value FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM accounts AS jac
WHERE jac.code = znob.code
); | {
"outer_table": "tasks",
"inner_table": "accounts",
"outer_alias": "znob",
"inner_alias": "jac",
"proj_col": "value",
"join_col": "code",
"correlated_ref": "znob.code",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01462 | train |
v1 | Schema:
invoices (alias: fal)(name, date, amount, code)
staff(amount, id, type, name)
Task: Select name from invoices where id exists in staff for the same status.
SQL: | SELECT name FROM invoices AS fal
WHERE id IN (
SELECT id FROM staff AS xnob
WHERE xnob.status = fal.status
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "name",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "fal.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01463 | train |
v2 | Schema:
regions (alias: okiv)(salary, level, date, value)
requests(level, code, id, name)
Task: Find salary from regions where a matching record exists in requests with the same status.
SQL: | SELECT salary FROM regions AS okiv
WHERE EXISTS (
SELECT 1 FROM requests AS ejof
WHERE ejof.status = okiv.status
); | {
"outer_table": "regions",
"inner_table": "requests",
"outer_alias": "okiv",
"inner_alias": "ejof",
"proj_col": "salary",
"join_col": "status",
"correlated_ref": "okiv.status",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01464 | train |
v3 | Schema:
employees (alias: bev)(amount, salary, type, value)
accounts(date, id, level, type)
Task: Retrieve value from employees with amount above the AVG(salary) of accounts rows sharing the same status.
SQL: | SELECT value FROM employees AS bev
WHERE amount > (
SELECT AVG(salary) FROM accounts AS jac
WHERE jac.status = bev.status
); | {
"outer_table": "employees",
"inner_table": "accounts",
"outer_alias": "bev",
"inner_alias": "jac",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "salary",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "bev.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01465 | train |
v1 | Schema:
employees (alias: bev)(status, salary, date, level)
products(status, type, amount, id)
Task: Retrieve amount from employees whose level is found in products rows where type matches the outer record.
SQL: | SELECT amount FROM employees AS bev
WHERE level IN (
SELECT level FROM products AS nad
WHERE nad.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "amount",
"filter_col": "level",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01466 | train |
v1 | Schema:
schedules (alias: vmob)(salary, type, amount, value)
products(type, id, level, name)
Task: Find salary from schedules where id appears in products entries with matching type.
SQL: | SELECT salary FROM schedules AS vmob
WHERE id IN (
SELECT id FROM products AS nad
WHERE nad.type = vmob.type
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "id",
"join_col": "type",
"correlated_ref": "vmob.type",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01467 | train |
v2 | Schema:
orders (alias: kab)(value, amount, date, salary)
schedules(amount, name, type, code)
Task: Find code from orders where a matching record exists in schedules with the same type.
SQL: | SELECT code FROM orders AS kab
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.type = kab.type
); | {
"outer_table": "orders",
"inner_table": "schedules",
"outer_alias": "kab",
"inner_alias": "vmob",
"proj_col": "code",
"join_col": "type",
"correlated_ref": "kab.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01468 | train |
v1 | Schema:
accounts (alias: jac)(name, date, status, amount)
shipments(name, amount, type, level)
Task: Find id from accounts where type appears in shipments entries with matching code.
SQL: | SELECT id FROM accounts AS jac
WHERE type IN (
SELECT type FROM shipments AS vnob
WHERE vnob.code = jac.code
); | {
"outer_table": "accounts",
"inner_table": "shipments",
"outer_alias": "jac",
"inner_alias": "vnob",
"proj_col": "id",
"filter_col": "type",
"join_col": "code",
"correlated_ref": "jac.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01469 | train |
v2 | Schema:
staff (alias: xnob)(id, date, name, salary)
schedules(date, amount, salary, code)
Task: Find value from staff where a matching record exists in schedules with the same id.
SQL: | SELECT value FROM staff AS xnob
WHERE EXISTS (
SELECT 1 FROM schedules AS vmob
WHERE vmob.id = xnob.id
); | {
"outer_table": "staff",
"inner_table": "schedules",
"outer_alias": "xnob",
"inner_alias": "vmob",
"proj_col": "value",
"join_col": "id",
"correlated_ref": "xnob.id",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01470 | train |
v1 | Schema:
products (alias: nad)(status, level, date, name)
projects(salary, id, value, amount)
Task: Select id from products where status exists in projects for the same level.
SQL: | SELECT id FROM products AS nad
WHERE status IN (
SELECT status FROM projects AS uliv
WHERE uliv.level = nad.level
); | {
"outer_table": "products",
"inner_table": "projects",
"outer_alias": "nad",
"inner_alias": "uliv",
"proj_col": "id",
"filter_col": "status",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01471 | train |
v2 | Schema:
items (alias: ikob)(level, status, salary, code)
projects(id, type, code, status)
Task: Find value from items where a matching record exists in projects with the same level.
SQL: | SELECT value FROM items AS ikob
WHERE EXISTS (
SELECT 1 FROM projects AS uliv
WHERE uliv.level = ikob.level
); | {
"outer_table": "items",
"inner_table": "projects",
"outer_alias": "ikob",
"inner_alias": "uliv",
"proj_col": "value",
"join_col": "level",
"correlated_ref": "ikob.level",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01472 | train |
v2 | Schema:
tasks (alias: znob)(amount, value, status, name)
staff(value, name, amount, id)
Task: Find salary from tasks where a matching record exists in staff with the same type.
SQL: | SELECT salary FROM tasks AS znob
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.type = znob.type
); | {
"outer_table": "tasks",
"inner_table": "staff",
"outer_alias": "znob",
"inner_alias": "xnob",
"proj_col": "salary",
"join_col": "type",
"correlated_ref": "znob.type",
"token_group": "T2",
"fan_out": 35
} | T2 | cs9_fixed_v1_train_01473 | train |
v3 | Schema:
shipments (alias: vnob)(level, id, status, name)
accounts(type, level, name, value)
Task: Find amount from shipments where salary exceeds the minimum value from accounts for the same id.
SQL: | SELECT amount FROM shipments AS vnob
WHERE salary > (
SELECT MIN(value) FROM accounts AS jac
WHERE jac.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01474 | train |
v2 | Schema:
employees (alias: bev)(level, status, value, date)
products(salary, code, name, id)
Task: Retrieve id from employees that have at least one corresponding entry in products sharing the same type.
SQL: | SELECT id FROM employees AS bev
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.type = bev.type
); | {
"outer_table": "employees",
"inner_table": "products",
"outer_alias": "bev",
"inner_alias": "nad",
"proj_col": "id",
"join_col": "type",
"correlated_ref": "bev.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01475 | train |
v2 | Schema:
products (alias: nad)(status, id, code, salary)
orders(type, amount, status, date)
Task: Retrieve salary from products that have at least one corresponding entry in orders sharing the same id.
SQL: | SELECT salary FROM products AS nad
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.id = nad.id
); | {
"outer_table": "products",
"inner_table": "orders",
"outer_alias": "nad",
"inner_alias": "kab",
"proj_col": "salary",
"join_col": "id",
"correlated_ref": "nad.id",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01476 | train |
v3 | Schema:
shipments (alias: vnob)(level, status, amount, salary)
accounts(status, value, name, date)
Task: Find id from shipments where salary exceeds the count of amount from accounts for the same id.
SQL: | SELECT id FROM shipments AS vnob
WHERE salary > (
SELECT COUNT(amount) FROM accounts AS jac
WHERE jac.id = vnob.id
); | {
"outer_table": "shipments",
"inner_table": "accounts",
"outer_alias": "vnob",
"inner_alias": "jac",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "id",
"correlated_ref": "vnob.id",
"token_group": "T2",
"fan_out": 45
} | T2 | cs9_fixed_v1_train_01477 | train |
v1 | Schema:
orders (alias: kab)(name, status, id, code)
sales(salary, name, type, value)
Task: Retrieve value from orders whose level is found in sales rows where status matches the outer record.
SQL: | SELECT value 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": "value",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "kab.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01478 | train |
v3 | Schema:
products (alias: nad)(id, status, code, level)
orders(name, type, value, code)
Task: Find value from products where salary exceeds the total value from orders for the same level.
SQL: | SELECT value FROM products AS nad
WHERE salary > (
SELECT SUM(value) FROM orders AS kab
WHERE kab.level = nad.level
); | {
"outer_table": "products",
"inner_table": "orders",
"outer_alias": "nad",
"inner_alias": "kab",
"proj_col": "value",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "SUM",
"join_col": "level",
"correlated_ref": "nad.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01479 | train |
v1 | Schema:
customers (alias: lex)(date, amount, level, value)
sales(id, code, salary, type)
Task: Select code from customers where type exists in sales for the same level.
SQL: | SELECT code FROM customers AS lex
WHERE type IN (
SELECT type FROM sales AS cif
WHERE cif.level = lex.level
); | {
"outer_table": "customers",
"inner_table": "sales",
"outer_alias": "lex",
"inner_alias": "cif",
"proj_col": "code",
"filter_col": "type",
"join_col": "level",
"correlated_ref": "lex.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01480 | train |
v3 | Schema:
schedules (alias: vmob)(type, amount, name, date)
products(salary, name, level, amount)
Task: Find salary from schedules where amount exceeds the count of value from products for the same level.
SQL: | SELECT salary FROM schedules AS vmob
WHERE amount > (
SELECT COUNT(value) FROM products AS nad
WHERE nad.level = vmob.level
); | {
"outer_table": "schedules",
"inner_table": "products",
"outer_alias": "vmob",
"inner_alias": "nad",
"proj_col": "salary",
"filter_col": "amount",
"agg_col": "value",
"agg_fn": "COUNT",
"join_col": "level",
"correlated_ref": "vmob.level",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01481 | train |
v1 | Schema:
schedules (alias: vmob)(type, value, level, code)
customers(level, id, amount, value)
Task: Select code from schedules where id exists in customers for the same status.
SQL: | SELECT code FROM schedules AS vmob
WHERE id IN (
SELECT id FROM customers AS lex
WHERE lex.status = vmob.status
); | {
"outer_table": "schedules",
"inner_table": "customers",
"outer_alias": "vmob",
"inner_alias": "lex",
"proj_col": "code",
"filter_col": "id",
"join_col": "status",
"correlated_ref": "vmob.status",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01482 | train |
v2 | Schema:
sales (alias: cif)(level, salary, status, type)
orders(salary, code, date, type)
Task: Retrieve amount from sales that have at least one corresponding entry in orders sharing the same level.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM orders AS kab
WHERE kab.level = cif.level
); | {
"outer_table": "sales",
"inner_table": "orders",
"outer_alias": "cif",
"inner_alias": "kab",
"proj_col": "amount",
"join_col": "level",
"correlated_ref": "cif.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01483 | train |
v3 | Schema:
schedules (alias: vmob)(type, id, code, salary)
sales(id, amount, name, salary)
Task: Retrieve amount from schedules with salary above the MIN(amount) of sales rows sharing the same id.
SQL: | SELECT amount FROM schedules AS vmob
WHERE salary > (
SELECT MIN(amount) FROM sales AS cif
WHERE cif.id = vmob.id
); | {
"outer_table": "schedules",
"inner_table": "sales",
"outer_alias": "vmob",
"inner_alias": "cif",
"proj_col": "amount",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "MIN",
"join_col": "id",
"correlated_ref": "vmob.id",
"token_group": "T2",
"fan_out": 50
} | T2 | cs9_fixed_v1_train_01484 | train |
v3 | Schema:
staff (alias: xnob)(type, level, name, status)
regions(code, salary, date, type)
Task: Find id from staff where salary exceeds the average amount from regions for the same status.
SQL: | SELECT id FROM staff AS xnob
WHERE salary > (
SELECT AVG(amount) FROM regions AS okiv
WHERE okiv.status = xnob.status
); | {
"outer_table": "staff",
"inner_table": "regions",
"outer_alias": "xnob",
"inner_alias": "okiv",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "AVG",
"join_col": "status",
"correlated_ref": "xnob.status",
"token_group": "T2",
"fan_out": 40
} | T2 | cs9_fixed_v1_train_01485 | train |
v2 | Schema:
requests (alias: ejof)(level, id, type, date)
sales(type, code, date, level)
Task: Retrieve name from requests that have at least one corresponding entry in sales sharing the same status.
SQL: | SELECT name FROM requests AS ejof
WHERE EXISTS (
SELECT 1 FROM sales AS cif
WHERE cif.status = ejof.status
); | {
"outer_table": "requests",
"inner_table": "sales",
"outer_alias": "ejof",
"inner_alias": "cif",
"proj_col": "name",
"join_col": "status",
"correlated_ref": "ejof.status",
"token_group": "T2",
"fan_out": 70
} | T2 | cs9_fixed_v1_train_01486 | train |
v2 | Schema:
sales (alias: cif)(name, amount, code, status)
branches(code, salary, date, value)
Task: Retrieve amount from sales that have at least one corresponding entry in branches sharing the same code.
SQL: | SELECT amount FROM sales AS cif
WHERE EXISTS (
SELECT 1 FROM branches AS agov
WHERE agov.code = cif.code
); | {
"outer_table": "sales",
"inner_table": "branches",
"outer_alias": "cif",
"inner_alias": "agov",
"proj_col": "amount",
"join_col": "code",
"correlated_ref": "cif.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01487 | train |
v2 | Schema:
managers (alias: hac)(id, value, type, name)
shipments(amount, level, salary, status)
Task: Find value from managers where a matching record exists in shipments with the same type.
SQL: | SELECT value FROM managers AS hac
WHERE EXISTS (
SELECT 1 FROM shipments AS vnob
WHERE vnob.type = hac.type
); | {
"outer_table": "managers",
"inner_table": "shipments",
"outer_alias": "hac",
"inner_alias": "vnob",
"proj_col": "value",
"join_col": "type",
"correlated_ref": "hac.type",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01488 | train |
v3 | Schema:
categories (alias: egiv)(date, amount, type, id)
managers(value, amount, level, id)
Task: Find value from categories where value exceeds the maximum value from managers for the same status.
SQL: | SELECT value FROM categories AS egiv
WHERE value > (
SELECT MAX(value) FROM managers AS hac
WHERE hac.status = egiv.status
); | {
"outer_table": "categories",
"inner_table": "managers",
"outer_alias": "egiv",
"inner_alias": "hac",
"proj_col": "value",
"filter_col": "value",
"agg_col": "value",
"agg_fn": "MAX",
"join_col": "status",
"correlated_ref": "egiv.status",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01489 | train |
v1 | Schema:
items (alias: ikob)(id, name, date, type)
branches(level, salary, date, code)
Task: Retrieve name from items whose code is found in branches rows where id matches the outer record.
SQL: | SELECT name FROM items AS ikob
WHERE code IN (
SELECT code FROM branches AS agov
WHERE agov.id = ikob.id
); | {
"outer_table": "items",
"inner_table": "branches",
"outer_alias": "ikob",
"inner_alias": "agov",
"proj_col": "name",
"filter_col": "code",
"join_col": "id",
"correlated_ref": "ikob.id",
"token_group": "T2",
"fan_out": 60
} | T2 | cs9_fixed_v1_train_01490 | train |
v2 | Schema:
invoices (alias: fal)(value, salary, code, date)
staff(id, name, date, amount)
Task: Retrieve name from invoices that have at least one corresponding entry in staff sharing the same code.
SQL: | SELECT name FROM invoices AS fal
WHERE EXISTS (
SELECT 1 FROM staff AS xnob
WHERE xnob.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "staff",
"outer_alias": "fal",
"inner_alias": "xnob",
"proj_col": "name",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01491 | train |
v3 | Schema:
invoices (alias: fal)(salary, value, date, code)
orders(level, date, status, name)
Task: Retrieve name from invoices with amount above the MAX(amount) of orders rows sharing the same code.
SQL: | SELECT name FROM invoices AS fal
WHERE amount > (
SELECT MAX(amount) FROM orders AS kab
WHERE kab.code = fal.code
); | {
"outer_table": "invoices",
"inner_table": "orders",
"outer_alias": "fal",
"inner_alias": "kab",
"proj_col": "name",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "fal.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01492 | train |
v3 | Schema:
accounts (alias: jac)(code, type, date, status)
managers(id, code, value, level)
Task: Retrieve id from accounts with salary above the AVG(value) of managers rows sharing the same level.
SQL: | SELECT id FROM accounts AS jac
WHERE salary > (
SELECT AVG(value) FROM managers AS hac
WHERE hac.level = jac.level
); | {
"outer_table": "accounts",
"inner_table": "managers",
"outer_alias": "jac",
"inner_alias": "hac",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "value",
"agg_fn": "AVG",
"join_col": "level",
"correlated_ref": "jac.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01493 | train |
v3 | Schema:
regions (alias: okiv)(status, value, level, name)
sales(value, code, type, id)
Task: Retrieve id from regions with salary above the SUM(amount) of sales rows sharing the same type.
SQL: | SELECT id FROM regions AS okiv
WHERE salary > (
SELECT SUM(amount) FROM sales AS cif
WHERE cif.type = okiv.type
); | {
"outer_table": "regions",
"inner_table": "sales",
"outer_alias": "okiv",
"inner_alias": "cif",
"proj_col": "id",
"filter_col": "salary",
"agg_col": "amount",
"agg_fn": "SUM",
"join_col": "type",
"correlated_ref": "okiv.type",
"token_group": "T2",
"fan_out": 55
} | T2 | cs9_fixed_v1_train_01494 | train |
v3 | Schema:
products (alias: nad)(date, value, amount, id)
items(amount, code, type, name)
Task: Retrieve value from products with amount above the COUNT(amount) of items rows sharing the same code.
SQL: | SELECT value FROM products AS nad
WHERE amount > (
SELECT COUNT(amount) FROM items AS ikob
WHERE ikob.code = nad.code
); | {
"outer_table": "products",
"inner_table": "items",
"outer_alias": "nad",
"inner_alias": "ikob",
"proj_col": "value",
"filter_col": "amount",
"agg_col": "amount",
"agg_fn": "COUNT",
"join_col": "code",
"correlated_ref": "nad.code",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01495 | train |
v3 | Schema:
categories (alias: egiv)(code, date, type, value)
schedules(date, salary, code, name)
Task: Find value from categories where value exceeds the maximum salary from schedules for the same code.
SQL: | SELECT value FROM categories AS egiv
WHERE value > (
SELECT MAX(salary) FROM schedules AS vmob
WHERE vmob.code = egiv.code
); | {
"outer_table": "categories",
"inner_table": "schedules",
"outer_alias": "egiv",
"inner_alias": "vmob",
"proj_col": "value",
"filter_col": "value",
"agg_col": "salary",
"agg_fn": "MAX",
"join_col": "code",
"correlated_ref": "egiv.code",
"token_group": "T2",
"fan_out": 80
} | T2 | cs9_fixed_v1_train_01496 | train |
v2 | Schema:
branches (alias: agov)(value, id, date, amount)
products(salary, amount, value, name)
Task: Find salary from branches where a matching record exists in products with the same level.
SQL: | SELECT salary FROM branches AS agov
WHERE EXISTS (
SELECT 1 FROM products AS nad
WHERE nad.level = agov.level
); | {
"outer_table": "branches",
"inner_table": "products",
"outer_alias": "agov",
"inner_alias": "nad",
"proj_col": "salary",
"join_col": "level",
"correlated_ref": "agov.level",
"token_group": "T2",
"fan_out": 95
} | T2 | cs9_fixed_v1_train_01497 | train |
v1 | Schema:
transactions (alias: gev)(code, type, amount, date)
staff(type, amount, id, status)
Task: Retrieve salary from transactions whose type is found in staff rows where level matches the outer record.
SQL: | SELECT salary FROM transactions AS gev
WHERE type IN (
SELECT type 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": "type",
"join_col": "level",
"correlated_ref": "gev.level",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01498 | train |
v1 | Schema:
sales (alias: cif)(date, amount, level, name)
projects(status, type, name, code)
Task: Find name from sales where level appears in projects entries with matching status.
SQL: | SELECT name FROM sales AS cif
WHERE level IN (
SELECT level FROM projects AS uliv
WHERE uliv.status = cif.status
); | {
"outer_table": "sales",
"inner_table": "projects",
"outer_alias": "cif",
"inner_alias": "uliv",
"proj_col": "name",
"filter_col": "level",
"join_col": "status",
"correlated_ref": "cif.status",
"token_group": "T1",
"fan_out": 1
} | T1 | cs9_fixed_v1_train_01499 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.