Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
3
3
question
stringlengths
33
275
expected
stringlengths
4
34
value_type
stringclasses
6 values
tolerance
float64
0
0.01
⌀
measures
stringlengths
3
29
definition
stringlengths
21
357
⌀
difficulty
stringclasses
3 values
pattern
stringclasses
6 values
Q01
What is total revenue over every order in the dataset (1 Jan 2023 to 30 Jun 2026), including guest orders?
197329241.89
money
0
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
easy
null
Q02
What was total revenue in calendar year 2025?
61897312.54
money
0
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
easy
null
Q03
How many units were sold in 2024?
1542921
count
0
Quantity
Quantity: Σ quantity.
easy
null
Q04
What was revenue from the Online channel in 2025?
21050963.28
money
0
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
easy
null
Q05
How many orders were placed in 2025?
376829
count
0
Orders
null
easy
null
Q06
What was revenue for the Home & Kitchen category in Q4 2024?
3188248.84
money
0
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
easy
null
Q07
What was revenue for the Accessories subcategory of Apparel (not Electronics accessories) in 2025?
982974.27
money
0
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
medium
null
Q08
What was revenue from customers in Portland, Oregon (United States, West region) in 2025? Guest orders have no customer and are not counted in any customer geography.
650588.55
money
0
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately. Geography slices: Guest orders have no customer, so they have no country, region or city. Any customer-geography question covers identified customers only, and the regions therefore don't sum to total Revenue.
medium
null
Q09
What was revenue from customers in London, England (United Kingdom) in 2025? Guest orders have no customer and are not counted in any customer geography.
6815358.27
money
0
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately. Geography slices: Guest orders have no customer, so they have no country, region or city. Any customer-geography question covers identified customers only, and the regions therefore don't sum to total Revenue.
medium
null
Q10
What was the margin percentage across all sales in 2025?
0.367050
ratio
0.0001
Margin %
Margin %: Margin / Revenue, a ratio of sums.
medium
null
Q11
What was the margin percentage for Electronics in 2025?
0.252316
ratio
0.0001
Margin %
Margin %: Margin / Revenue, a ratio of sums.
medium
null
Q12
What was the margin (revenue minus cost) for Apparel in 2024?
2665835.08
money
0
Margin
Margin: Revenue − Cost.
easy
null
Q13
What was the total margin of the product 'Vireo 65" QLED TV Q65-V' over the whole dataset?
-357083.07
money
0
Margin
Margin: Revenue − Cost.
medium
P3
Q14
Which product had the lowest margin in 2025?
Vireo 65" QLED TV Q65-V
member
null
Margin
Margin: Revenue − Cost.
medium
P3
Q15
What was the margin percentage for Beauty in December 2025?
0.574817
ratio
0.0001
Margin %
Margin %: Margin / Revenue, a ratio of sums.
medium
null
Q16
What was the margin percentage for the Store channel year to date in 2026?
0.379002
ratio
0.0001
Margin %; YTD
Margin %: Margin / Revenue, a ratio of sums. YTD: 1 Jan through the as-of date of the same year. "YTD 2026" covers 2026-01-01..2026-06-30. "Prior YTD" covers 2025-01-01..2025-06-30.
medium
null
Q17
What was the average order value in 2025?
164.26
amount
0.01
AOV
AOV: Revenue / count(distinct order_id). "Category AOV" means category revenue / distinct orders containing at least one line in that category.
medium
null
Q18
What was the average order value for Online orders in 2025?
174.60
amount
0.01
AOV
AOV: Revenue / count(distinct order_id). "Category AOV" means category revenue / distinct orders containing at least one line in that category.
medium
null
Q19
What was the average order value in November 2025?
165.18
amount
0.01
AOV
AOV: Revenue / count(distinct order_id). "Category AOV" means category revenue / distinct orders containing at least one line in that category.
medium
null
Q20
What was the Electronics category AOV in 2025, defined as Electronics revenue divided by the number of distinct orders that contain at least one Electronics line?
186.34
amount
0.01
AOV
AOV: Revenue / count(distinct order_id). "Category AOV" means category revenue / distinct orders containing at least one line in that category.
hard
null
Q21
What was the average order value of orders placed by Corporate-segment customers in 2025?
238.17
amount
0.01
AOV
AOV: Revenue / count(distinct order_id). "Category AOV" means category revenue / distinct orders containing at least one line in that category.
medium
null
Q22
What was the sales-cohort return rate for Apparel sold in March 2025?
0.179999
ratio
0.0001
Return Rate (sales cohort)
Return Rate (sales cohort): Σ returned_qty for lines sold in the period / Σ quantity sold in the period. Attribution is by sale_date.
medium
P2
Q23
What was the sales-cohort return rate for Electronics sold in 2025?
0.077241
ratio
0.0001
Return Rate (sales cohort)
Return Rate (sales cohort): Σ returned_qty for lines sold in the period / Σ quantity sold in the period. Attribution is by sale_date.
medium
null
Q24
What was the return-month return rate for Apparel in January 2025: units returned with a return date in January 2025, divided by Apparel units sold in January 2025?
0.266387
ratio
0.0001
Return Rate (return month)
Return Rate (return month): Σ returned_qty with return_date in the period / Σ quantity sold in the period.
hard
P6
Q25
What was the sales-cohort return rate across all categories for sales made in 2025?
0.065530
ratio
0.0001
Return Rate (sales cohort)
Return Rate (sales cohort): Σ returned_qty for lines sold in the period / Σ quantity sold in the period. Attribution is by sale_date.
medium
null
Q26
What was the return-month return rate across all categories for January 2026?
0.092284
ratio
0.0001
Return Rate (return month)
Return Rate (return month): Σ returned_qty with return_date in the period / Σ quantity sold in the period.
hard
P6
Q27
What is the sales-cohort return rate for Apparel sold in June 2026, as of 30 June 2026?
0.083542
ratio
0.0001
Return Rate (sales cohort)
Return Rate (sales cohort): Σ returned_qty for lines sold in the period / Σ quantity sold in the period. Attribution is by sale_date.
hard
P6
Q28
Excluding Apparel, which category had the highest sales-cohort return rate for sales made in Q4 2025?
Electronics
member
null
Return Rate (sales cohort)
Return Rate (sales cohort): Σ returned_qty for lines sold in the period / Σ quantity sold in the period. Attribution is by sale_date.
medium
null
Q29
How many returned lines came from sales made in December 2025 but were returned in January 2026?
4450
count
0
Returns
null
medium
P6
Q30
What was the total refund amount for returns received (by return date) in 2025?
4705847.46
money
0
Refunds
null
medium
null
Q31
How many distinct customers placed at least one order in 2025?
74597
count
0
Distinct customers
Distinct customers: count of distinct non-NULL customer_id with at least one order in the slice.
easy
null
Q32
How many distinct customers in Germany placed at least one order in Q4 2025? Guest orders have no customer and are not counted in any customer geography.
7089
count
0
Distinct customers
Distinct customers: count of distinct non-NULL customer_id with at least one order in the slice. Geography slices: Guest orders have no customer, so they have no country, region or city. Any customer-geography question covers identified customers only, and the regions therefore don't sum to total Revenue.
easy
null
Q33
How many distinct customers placed at least one order in the first half of 2025 (January to June)?
49755
count
0
Distinct customers
Distinct customers: count of distinct non-NULL customer_id with at least one order in the slice.
medium
null
Q34
What was the repeat-customer rate in 2025: customers with two or more orders in 2025 divided by customers with at least one?
0.691288
ratio
0.0001
Repeat-customer rate
Repeat-customer rate: customers with at least 2 distinct orders within the period / distinct customers in the period.
medium
null
Q35
What was the repeat-customer rate for Online orders in 2025, counting only Online orders?
0.518248
ratio
0.0001
Repeat-customer rate
Repeat-customer rate: customers with at least 2 distinct orders within the period / distinct customers in the period.
hard
null
Q36
How many distinct customers bought at least one Apparel item in 2024?
34209
count
0
Distinct customers
Distinct customers: count of distinct non-NULL customer_id with at least one order in the slice.
easy
null
Q37
By what percentage did revenue grow in 2025 compared with 2024?
0.104915
ratio
0.0001
YoY %
YoY %: (X in period − X in the same period one year earlier) / X in the earlier period.
medium
null
Q38
What was revenue year to date in 2026?
29761734.70
money
0
Revenue; YTD
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately. YTD: 1 Jan through the as-of date of the same year. "YTD 2026" covers 2026-01-01..2026-06-30. "Prior YTD" covers 2025-01-01..2025-06-30.
easy
null
Q39
By what percentage did year-to-date 2026 revenue change against the same period of 2025 (prior YTD)?
0.136171
ratio
0.0001
YoY %; YTD
YoY %: (X in period − X in the same period one year earlier) / X in the earlier period. YTD: 1 Jan through the as-of date of the same year. "YTD 2026" covers 2026-01-01..2026-06-30. "Prior YTD" covers 2025-01-01..2025-06-30.
medium
null
Q40
By what percentage did Q2 2025 revenue change against the same quarter last year?
0.099760
ratio
0.0001
YoY %; Same quarter last year
YoY %: (X in period − X in the same period one year earlier) / X in the earlier period. Same quarter last year: The same quarter, one year earlier.
medium
P1
Q41
By what percentage did Electronics units sold change in 2025 compared with 2024?
0.113249
ratio
0.0001
Quantity; YoY %
Quantity: Σ quantity. YoY %: (X in period − X in the same period one year earlier) / X in the earlier period.
medium
null
Q42
By what percentage did February 2024 revenue change against February 2023? (February 2024 has 29 days.)
0.121154
ratio
0.0001
YoY %
YoY %: (X in period − X in the same period one year earlier) / X in the earlier period.
hard
null
Q43
What was revenue on 29 February 2024?
111840.93
money
0
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
easy
null
Q44
How many percentage points did the margin percentage change from prior YTD (Jan to Jun 2025) to YTD 2026? Give the difference of the two margin percentages as a fraction (e.g. -0.0123).
0.000796
ratio
0.0001
Margin %; YTD
Margin %: Margin / Revenue, a ratio of sums. YTD: 1 Jan through the as-of date of the same year. "YTD 2026" covers 2026-01-01..2026-06-30. "Prior YTD" covers 2025-01-01..2025-06-30.
hard
null
Q45
Which month of 2025 had the highest revenue?
December
member
null
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
easy
P4
Q46
By what percentage did December 2025 revenue change against November 2025?
0.002600
ratio
0.0001
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
medium
P4
Q47
By what percentage did Online revenue year to date in 2026 change against Online revenue in the prior YTD?
0.153846
ratio
0.0001
YoY %; YTD
YoY %: (X in period − X in the same period one year earlier) / X in the earlier period. YTD: 1 Jan through the as-of date of the same year. "YTD 2026" covers 2026-01-01..2026-06-30. "Prior YTD" covers 2025-01-01..2025-06-30.
medium
null
Q48
What share of total 2025 revenue came from Electronics?
0.419988
ratio
0.0001
Share of parent
Share of parent: child Revenue / parent Revenue: category / all, subcategory / its category, region / its country.
easy
null
Q49
What share of Electronics revenue in 2025 came from the TVs subcategory?
0.207002
ratio
0.0001
Share of parent
Share of parent: child Revenue / parent Revenue: category / all, subcategory / its category, region / its country.
medium
null
Q50
What share of Apparel revenue in 2025 came from Apparel's Accessories subcategory?
0.163515
ratio
0.0001
Share of parent
Share of parent: child Revenue / parent Revenue: category / all, subcategory / its category, region / its country.
medium
null
Q51
What share of 2025 revenue from United States customers came from the Midwest region? Guest orders have no customer and are not counted in any customer geography.
0.174677
ratio
0.0001
Share of parent
Share of parent: child Revenue / parent Revenue: category / all, subcategory / its category, region / its country. Geography slices: Guest orders have no customer, so they have no country, region or city. Any customer-geography question covers identified customers only, and the regions therefore don't sum to total Reve...
medium
P1
Q52
What share of 2025 revenue came from the Online channel?
0.340095
ratio
0.0001
Share of parent
Share of parent: child Revenue / parent Revenue: category / all, subcategory / its category, region / its country.
easy
null
Q53
Which customer region (country and region) had the largest percentage revenue decline in Q2 2025 against Q2 2024, and what was that change? Answer as 'Country / Region' and the change as a fraction. Guest orders have no customer and are not counted in any customer geography.
United States / Midwest; -0.213373
member_and_ratio
0.0001
YoY %; Same quarter last year
YoY %: (X in period − X in the same period one year earlier) / X in the earlier period. Same quarter last year: The same quarter, one year earlier. Geography slices: Guest orders have no customer, so they have no country, region or city. Any customer-geography question covers identified customers only, and the regions ...
hard
P1
Q54
Which category's sales-cohort return rate stays the same from month to month, across sale months whose 90-day return window had closed by 30 June 2026 (January 2023 to March 2026)?
Apparel
member
null
Return Rate (sales cohort)
Return Rate (sales cohort): Σ returned_qty for lines sold in the period / Σ quantity sold in the period. Attribution is by sale_date.
hard
P2
Q55
Which product had a negative margin in every calendar year of the data (2023, 2024, 2025 and 2026 to date)?
Vireo 65" QLED TV Q65-V
member
null
Margin
Margin: Revenue − Cost.
medium
P3
Q56
On which date in 2025 was revenue highest?
2025-11-28
member
null
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
easy
P4
Q57
In 2025, what was average monthly revenue in November and December divided by average monthly revenue from February to October?
1.675232
ratio
0.0001
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
medium
P4
Q58
What was revenue from guest checkouts (orders with no customer) in 2025?
1384310.43
money
0
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
medium
P5
Q59
What share of 2025 revenue cannot be attributed to any customer country because the order was a guest checkout?
0.022365
ratio
0.0001
Share of parent
Share of parent: child Revenue / parent Revenue: category / all, subcategory / its category, region / its country.
medium
P5
Q60
What was 2025 revenue from customers whose segment is not recorded?
596959.10
money
0
Revenue
Revenue: Σ net_amount. Net of discounts. Not net of returns; returns are measured separately.
medium
P5

Retail star schema with an answer key

A synthetic retail sales star schema for ClickHouse (1.2 million orders, 3 million order lines, January 2023 to June 2026) and 60 questions, each with its SQL and one checked answer. It tests whether an agent, a cube or a model computes the right number. Read DATASET_CARD.md first: the tables, the measure definitions the answers use, and how the data was made and checked.

Download

The whole package as one file: retail_star_v1.zip (128 MB). The same files, laid out as below, with the Hugging Face CLI:

hf download misatadata/retail-star-answer-key --repo-type dataset --local-dir retail-star

What is in the package

Path What
data/parquet/*.parquet one file per table, zstd, exact decimals
data/csv/*.csv the same tables as CSVWithNames, \N for NULL
data/ROWCOUNTS, data/MANIFEST.json rows per table; every file's rows, size and SHA-256
clickhouse/ddl.sql, clickhouse/load.sh the tables (MergeTree, pinned types) and a loader that checks row counts
answer_key/questions.jsonl one record per question: the question, the measure definitions it uses, SQL for ClickHouse and DuckDB, the expected value, its tolerance, the traps it tests
answer_key/answer_key.md, answer_key.csv the same, as a table
DATASET_CARD.md tables, definitions, as-of date, how it was made and verified
PATTERNS.md the planted patterns and traps, measured; for the person grading, not for agents
calibration/ the price calibration: aggregates of US retail listings per kind of product, and the script that makes them
LICENSE CC BY 4.0: use, share and adapt it for any purpose, with credit

Load into ClickHouse

With ClickHouse running in Docker as clickhouse:

CLICKHOUSE_CLIENT="docker exec -i clickhouse clickhouse-client" clickhouse/load.sh parquet

With clickhouse-client on the path, clickhouse/load.sh parquet is enough. clickhouse/load.sh csv loads the CSV files instead. The loader creates the tables, loads each one, and checks every table's row count against data/ROWCOUNTS. It skips tables it has already loaded; --reset drops them and starts over. CH_DATABASE picks a database other than default.

Plain INSERT ... FORMAT Parquet works as well; keep input_format_null_as_default=0 so NULL customer ids and segments stay NULL instead of becoming 0 and ''.

Query without loading

DuckDB reads the Parquet files directly, and every question has DuckDB SQL beside the ClickHouse SQL:

CREATE VIEW order_lines AS SELECT * FROM 'data/parquet/order_lines.parquet';

Grading

Compare an answer with expected within tolerance (questions.jsonl): money exact to the cent, averages of money within ±0.01, ratios within ±0.0001, members by exact name. Every answer was computed on ClickHouse 24.3, 26.8 and 26.9 and on DuckDB and checked equal, and a sample was recomputed without SQL. PATTERNS.md lists what a wrong answer usually looks like, so a failure can be put down to the agent, the model or the dataset.

License

CC BY 4.0 (LICENSE). Credit it as "Retail star schema with a verified answer key, generated with Misata Studio (misata.studio), CC BY 4.0".

Downloads last month
56