Retail star schema

A dimensional model you can actually practise joins on: one fact table, four dimensions, 63,170 rows, and every join resolving.

Every free mock-data generator hands you one flat CSV, and a flat file has no joins. That makes it useless for the exact skill most people downloading practice data are trying to learn. This is a real star schema: fact_sales joined to date, product, customer and store dimensions, with no orphaned rows and no duplicate keys in any dimension. Two things about it are declared rather than sampled, which is what makes it worth practising on: the category share of revenue is exact to the cent, and monthly revenue follows a stated two-year curve. Your GROUP BY has an answer that is known to be right, so you can check your own SQL instead of eyeballing whether it looks plausible.

  • star schema
  • dimensional model
  • BI practice
  • Power BI
  • Tableau
  • SQL joins
015,00030,000Jan 2024Apr 2024Jul 2024Oct 2024Jan 2025Apr 2025Jul 2025Oct 2025Dec 2025
Rows per month in fact_sales.sold_at, counted from the file.

Explore

Every table, profiled

Each column's type, spread, empties and most common values, measured from the CSVs in the download. Switch to the first rows to see the data exactly as it sits in the file.

fact_sales.csv

60,000 rows · 11 columns · 4 foreign keys

sale_idprimary key
unique on every row
60,000 distinctno empties
date_keyforeign key
points to dim_date.date_key
730 distinctno empties
product_keyforeign key
points to dim_product.product_key
400 distinctno empties
customer_keyforeign key
points to dim_customer.customer_key
2,000 distinctno empties
store_keyforeign key
points to dim_store.store_key
40 distinctno empties
sold_atdate
Jan 2024Dec 2025
2024-01-01 to 2025-12-31no empties
quantitynumber
18
mean 2.23median 11 to 8no empties
unit_pricenumber
5log scale732
mean 66.69median 335 to 900no empties
discount_pctnumber
0.351.35
mean 0.35median 0.350.35 to 0.35no empties
revenuenumber
3.09217.1
mean 57.5median 47.90.11 to 395.3no empties
categorycategory
  • Electronics
    42%
  • Home
    26%
  • Apparel
    20%
  • Grocery
    12%
4 valuesno empties

Keys

Every join resolves

4 foreign keys, 240,000 references checked against the table each one points at. None points at a row that does not exist.

fact_sales

  • date_keydim_date.date_key0 orphans
  • product_keydim_product.product_key0 orphans
  • customer_keydim_customer.customer_key0 orphans
  • store_keydim_store.store_key0 orphans

Checks

What we checked

  • Zero orphaned rows joining fact_sales to all four dimensions
  • Zero duplicate keys in dim_date, dim_product, dim_customer and dim_store
  • Electronics is 42.00% of revenue, Home 26.00%, Apparel 20.00%, Grocery 12.00%
  • January 2024 revenue is exactly 820,000.00, as declared
  • December 2024 is exactly 1,150,000.00 and December 2025 exactly 1,480,000.00
  • Checked with DuckDB against these exact files, which shares no code with the generator

The same checks ship in the zip as INTEGRITY.txt, so you can rerun them in any SQL engine. How we verify

Questions

Worth asking it

  1. 1Which category earns most in which region?
  2. 2How does revenue grow month over month across two years?
  3. 3Do premium products sell better to Corporate or to Consumer?
  4. 4Which stores beat their region's average basket size?

Full version · $15

This sample, or the full Retail Data Warehouse

Two fiscal years of a grocery chain, from the shelf to the receipt. Try its free preview before you decide.

This sampleRetail Data Warehouse
Rows63,1702,790,852
Tables514
Columns33194
FormatsCSVCSV, Parquet, SQL DDL, worked SQL
AuditKeys and the checks listed above117 checks, all listed
LicenceCC0, freeCommercial use, $15 once
Built forstar schema, dimensional model, BI practice, Power BIStar schema and BI, Demand forecasting, Promotion and price analytics, Inventory and supply chain, Customer analytics, Returns and fraud-style exercises

Use it

Take it, or make one shaped like yours

Rebuild it byte for byte

The zip includes schema.yaml. Run misata generate --config schema.yaml with seed 21 and you get the same rows.

Your own tables, your own numbers

Describe the data you need in Studio and get connected tables with the totals you state, profiled like this and checked before you download.

The full version, and what goes with it

All premium
  • Weekly sales, at regular price and on promotion

    Grocery chain, 10 stores, fiscal 2024 and 2025

    Two fiscal years of a grocery chain, from the shelf to the receipt

    Answer key

    • baseline_units
    • price_effect
    • promo_lift
    • +7 more
    Rows
    2,790,852
    Tables
    14
    Checks
    117 of 117
    Free previewProfile and preview
  • An X-bar chart with the truth underneath: flatness, characteristic 139

    3 plants, 36 CNC machines, six months

    Six months of control charts with the ground truth underneath

    Answer key

    • active_cause_id
    • true_cause_shift_sigma
    • true_tool_wear_sigma
    • +6 more
    Rows
    515,442
    Tables
    15
    Checks
    101 of 101
    Free previewProfile and preview
  • Vibration through a life that ends in failure

    240 machines at 4 plants, two years

    Two years of sensor readings, failures, repairs and costs for 240 machines

    Answer key

    • failure_mode
    • true_life_days
    • true_failure_at
    • +6 more
    Rows
    179,038
    Tables
    6
    Checks
    67 of 67
    Free previewProfile and preview

Related free datasets

All 12

Fully synthetic. No real person, company or transaction is represented, and no production data was read to make it. CC0: use it anywhere, no attribution needed.