milestone 4/6 EDA: explore before telling the story
Explore distributions and relationships before reporting.
Warehouse and Reporting · Profile raw CRM/sales records, build Silver and Gold tables in the disposable lab, explore the fact table, and publish repeatable reporting logic.
approach
Start with schema, dimension categories, date coverage, measures, and grain. COUNT(DISTINCT sale_key) counts sales lines in this model, not a missing order-header identifier. Define what a metric counts before putting it into a report.
worked-example.sql
SELECT MIN(order_date) AS first_sale, MAX(order_date) AS last_sale, COUNT(*) AS sales_lines, SUM(sales) AS total_sales FROM fact_sales;
data for this milestone
fact_sales6 columns · 9 rows
| sale_keyinteger · key | customer_keyinteger | product_keyinteger | quantityinteger | salesreal | order_datetext |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 2 | 24 | 2025-01-01 |
| 2 | 2 | 3 | 1 | 80 | 2025-01-02 |
| 3 | 1 | 2 | 1 | 45 | 2025-01-15 |
| 4 | 3 | 4 | 2 | 240 | 2025-02-01 |
| 5 | 4 | 3 | 2 | 160 | 2025-02-05 |
showing 5 of 9 rows