runtime
Warehouse and Reporting · milestone 04 / 06

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 · keycustomer_keyintegerproduct_keyintegerquantityintegersalesrealorder_datetext
1112242025-01-01
2231802025-01-02
3121452025-01-15
43422402025-02-01
54321602025-02-05

showing 5 of 9 rows

challenge 1

Return first_sale, last_sale, sales_lines and total_sales as one summary row from fact_sales.

what to return

Columns
first_salelast_salesales_linestotal_sales in this order
Rows
any order
challenge-1.sql
 
3 steps left · check both queries and pass the concept checkOpen the reportNext milestone
EDA: explore before telling the story — Warehouse and Reporting · Runtime