export · preview
# Warehouse and Reporting
_Empty report_
Profile raw CRM/sales records, build Silver and Gold tables in the disposable lab, explore the fact table, and publish repeatable reporting logic.
- Sample database: Northstar Retail (bronze_customers, bronze_products, bronze_sales, dim_customer, dim_product, fact_sales)
- Milestones completed (SQL + concept check): 0 of 6
- Findings written: 0 of 6
- Verified checks (Check answer passed): 0
- Exported: 2026-10-14T17:59:07.924Z
Findings are the learner’s own interpretation. Passing a SQL check does not verify the written finding.
## Milestone 1: Bronze: inspect raw data before cleaning
Status: Not started
_No finding written yet._
### 1.1 Return customer_id (trimmed raw_id) and versions for non-NULL duplicate customer keys in bronze_customers. Keep only keys with more than one version.
_not attempted_
### 1.2 Return row_id and order_date for bronze sales whose date is invalid (date(order_date) IS NULL).
_not attempted_
## Milestone 2: Silver: clean, map & deduplicate
Status: Not started
_No finding written yet._
### 2.1 Create TEMP silver_customers: trim keys/names; discard NULL/empty keys; keep latest updated_at per trimmed key. Map US/USA→United States, GB/UK→United Kingdom, IND→India, CA→Canada. Return customer_id,name,country.
_not attempted_
### 2.2 Create the same TEMP silver_customers, then return country and customer_count per mapped country.
_not attempted_
## Milestone 3: Gold: dimensions, facts & quality gates
Status: Not started
_No finding written yet._
### 3.1 Build TEMP built_fact from bronze_sales and dimension lookups. Validate numeric positive quantity, valid date and matching trimmed natural keys. Recompute sales = quantity × dim_product.price. Return sale_key,customer_key,product_key,quantity,sales,order_date.
_not attempted_
### 3.2 Build the same TEMP built_fact; return rejected_rows as source row count minus built fact row count.
_not attempted_
## Milestone 4: EDA: explore before telling the story
Status: Not started
_No finding written yet._
### 4.1 Return first_sale, last_sale, sales_lines and total_sales as one summary row from fact_sales.
_not attempted_
### 4.2 Return metric and value using UNION ALL for Total sales (sum of sales), Units (sum of quantity), and Active customers (distinct customer_key) from fact_sales.
_not attempted_
## Milestone 5: Monthly change & cumulative reports
Status: Not started
_No finding written yet._
### 5.1 Return month (YYYY-MM),sales,running_sales for observed months; cumulative sales ordered by month. Sort output by month.
_not attempted_
### 5.2 Return month,sales,previous_sales,change_pct for observed months. Compare to previous observed month; percentage rounded to 2 decimals, NULL with no/nonzero denominator. Sort by month.
_not attempted_
## Milestone 6: Customer & product reporting contracts
Status: Not started
_No finding written yet._
### 6.1 Return customer_id,name,sales_lines,total_sales,recency_days for every dim_customer. Missing sales total=0; recency=NULL with no sales. Recency = days from last order_date to 2025-04-01, integer.
_not attempted_
### 6.2 Return product_id,name,total_sales,total_units,performance_segment for every dim_product. Missing totals=0. High if total_sales>=200, otherwise Standard.
_not attempted_