How can we build a customer summary aggregation table for reporting marts?
Aggregating clean completed orders generates Gold-layer customer metric dimensional marts.
Gold mart creation, executive customer dashboards, business intelligence summary tables.
SELECT
customer_id,
SUM(amount) AS total_spend,
COUNT(*) AS order_count
FROM source_orders
WHERE status = 'Completed'
GROUP BY customer_id;Practice typing production-grade SQL code for Aggregation Layer.