Retail star schema
A dimensional model you can actually practise joins on: one fact table, four dimensions, 47,051 rows, every join resolving and every total known.
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: a chain of 20 stores selling to 2,000 loyalty members over two years, with fact_sales joined to date, product, customer and store dimensions, no orphaned rows and no duplicate keys. Two things are declared rather than sampled: each category's share of two years' revenue is exact to the cent, and all 24 months of revenue land on a stated curve. Around those, it behaves like a shop: a few regulars place most of the lines, members shop at their home store, Saturdays are busiest, and the seasons move what sells. 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
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
43,900 rows · 11 columns · 4 foreign keys
- “10:30:07”
- “10:39:31”
- “10:40:54”
- Grocery62%
- Home15%
- Apparel14%
- Electronics8.8%
Keys
Every join resolves
4 foreign keys, 175,600 references checked against the table each one points at. None points at a row that does not exist.
fact_sales
- customer_keydim_customer.customer_key43,900 rows checked0 orphans
- store_keydim_store.store_key43,900 rows checked0 orphans
- product_keydim_product.product_key43,900 rows checked0 orphans
- date_keydim_date.date_key43,900 rows checked0 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
- Over the two years Electronics is 42.00% of revenue, Home 26.00%, Apparel 20.00%, Grocery 12.00%
- All 24 months of revenue land on the declared curve to the cent: 82,000.00 in January 2024, 148,000.00 in December 2025
- revenue = quantity × unit_price × (1 − discount_pct) on every row, and no sale is dated before its customer joined
- 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, answered
Worth asking it
Each answer is the query's result on these exact files. Open one for its SQL and rows, then check your own query against it.
1Which category earns most in which region?Top category by region: East Electronics (40.5%); North Electronics (41.7%); South Electronics (43.1%); West Electronics (41.7%).
with r as ( select s.region, f.category, sum(f.revenue) as revenue from fact_sales f join dim_store s on s.store_key = f.store_key group by s.region, f.category ) select region, category, round(revenue, 2) as revenue, round(100 * revenue / sum(revenue) over (partition by region), 1) as share_pct from r order by region, revenue descregion category revenue share_pct East Electronics 217,332.67 40.5 East Home 140,524.32 26.2 East Apparel 114,281.67 21.3 East Grocery 64,691.15 12.1 North Electronics 145,155.24 41.7 North Home 87,526.64 25.2 North Apparel 71,393.69 20.5 North Grocery 43,670.19 12.6 South Electronics 417,272.9 43.1 South Home 250,158.6 25.8 South Apparel 184,987.85 19.1 South Grocery 115,898.04 12 West Electronics 257,109.94 41.7 West Home 163,662.81 26.6 West Apparel 123,084.77 20 West Grocery 71,989.4 11.7 2How does revenue grow month over month across two years?$82,000 in 2024-01 to $148,000 in 2025-12, 1.80x over 24 months.
with m as ( select d.year, d.month, sum(f.revenue) as revenue from fact_sales f join dim_date d on d.date_key = f.date_key group by d.year, d.month ) select year, month, round(revenue, 2) as revenue, round(100 * (revenue / lag(revenue) over (order by year, month) - 1), 1) as growth_pct from m order by year, monthyear month revenue growth_pct 2,024 1 82,000 2,024 2 80,685.5 -1.6 2,024 3 90,419.72 12.1 2,024 4 90,056.72 -0.4 2,024 5 94,353.12 4.8 2,024 6 92,115.97 -2.4 2,024 7 93,627.12 1.6 2,024 8 97,052.8 3.7 2,024 9 90,940.42 -6.3 2,024 10 94,377.64 3.8 2,024 11 102,693.51 8.8 2,024 12 115,000 12 2,025 1 89,809.32 -21.9 2,025 2 89,864.41 0.1 2,025 3 102,360.17 13.9 2,025 4 103,576.27 1.2 2,025 5 110,201.27 6.4 2,025 6 109,211.86 -0.9 2,025 7 112,633.47 3.1 2,025 8 118,423.73 5.1 2,025 9 112,510.59 -5 2,025 10 118,347.46 5.2 2,025 11 130,478.81 10.3 2,025 12 148,000 13.4 3What is the gross margin by brand tier (Premium, Standard, Budget)?Standard 35.3%, Premium 32.3%, Budget 29.5% gross margin.
select p.subcategory as tier, round(sum(f.revenue), 2) as revenue, round(sum(f.quantity * p.unit_cost), 2) as cost, round(100 * (1 - sum(f.quantity * p.unit_cost) / sum(f.revenue)), 1) as gross_margin_pct from fact_sales f join dim_product p on p.product_key = f.product_key group by p.subcategory order by gross_margin_pct desctier revenue cost gross_margin_pct Standard 729,669.31 472,000.56 35.3 Premium 1,127,298.12 763,618.09 32.3 Budget 611,772.45 431,227.5 29.5 4Which customers shop away from their home city, and where?The busiest away trip is from Hartford to Austin (60 lines by 23 customers).
select c.city as home_city, s.city as store_city, count(*) as lines, count(distinct f.customer_key) as customers from fact_sales f join dim_customer c on c.customer_key = f.customer_key join dim_store s on s.store_key = f.store_key where c.city <> s.city group by c.city, s.city order by lines desc limit 10home_city store_city lines customers Hartford Austin 60 23 Pittsburgh Austin 56 33 Salt Lake City Austin 51 29 Charlotte Austin 48 37 Detroit Austin 47 22 Philadelphia Austin 46 24 Atlanta Austin 45 34 Phoenix Austin 42 22 Sacramento Austin 37 31 Austin Atlanta 36 27
Every query runs on the files in the download as they are. ANSWERS.sql holds all of them; run it in DuckDB from the dataset's folder.
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 sample | Retail Data Warehouse | |
|---|---|---|
| Rows | 47,051 | 2,790,852 |
| Tables | 5 | 14 |
| Columns | 49 | 194 |
| Formats | CSV | CSV, Parquet, SQL DDL, worked SQL |
| Audit | Keys and the checks listed above | 117 checks, all listed |
| Licence | CC0, free | Commercial use, $15 once |
| Built for | star schema, dimensional model, BI practice, Power BI | Star 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
How it was made
Made by the Misata engine at seed 21, from the design the README in the zip describes. Its build script is not public; Studio makes one shaped like it from a description.
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 premiumWeekly 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 preview18-question projectProfile and previewCard spending each month, debit and credit
2,500 US households at five banks and seven card issuers, two years
Five banks' raw statement lines, with every label behind them
Answer key
- description
- merchant_name
- category
- +6 more
- Rows
- 7,627,186
- Tables
- 14
- Checks
- 50 of 50
Free previewProfile and preview- transactions, rows per monthMay 2025 – Oct 2026
AML Transaction Monitoring
$5launch priceOne UAE bank, 10,000 customers, eighteen months
A UAE bank's whole trail from KYC to STR, with the laundering nobody caught
Answer key
- is_suspicious
- typology
- ring_id
- +7 more
- Rows
- 11,711,393
- Tables
- 16
- Checks
- 129 of 129
Free previewProfile and preview
Related free datasets
All 9- Ecommerce storefrontA year of orders across five joined tables, with best sellers, heavy buyers, a real Q4 peak and totals that reconcile to the cent.49,493 rows · 5 tables
- B2B SaaS subscription analyticsAccounts, seats, MRR, churn and support load, where company size actually drives the plan.42,240 rows · 5 tables
- Credit risk portfolio3,000 borrowers and 4,200 commercial loans, where a credit rating actually predicts whether the loan defaults, at the rate S&P's own data says it should.7,200 rows · 2 tables
- Network intrusion / netflow500 hosts and 20,000 labeled flows, where a port scan, a DDoS flood, and a brute-force attempt each carry the real statistical signature their MITRE ATT&CK technique actually leaves in traffic.20,500 rows · 2 tables
- Contact center queueing (Erlang C)4 queues, 2,400 half-hour intervals over a full business month, where agents_staffed is what Erlang C (1917) says is actually required to clear each queue's own SLA target, not a plausible-looking number.2,404 rows · 2 tables
- Clinical trial: sites, patients, visits and adverse eventsTwo trials across nine sites: enrolment, scheduled visits, dosing, lab biomarkers and graded adverse events, all in the right order.22,496 rows · 7 tables
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.

