Summary: This repo showcases SQL using ContosoRetailDW sample database. Projects include window functions, CTEs, GROUPING SETS reporting, reusable views, indexing, and before/after performance checks.
- 01 β Sales Analytics β KPI views (daily/monthly), rolling trends, territory rollups, indexing.
- 02 β Cohorts & Retention (coming up)
- 03 β RFM + CLV (coming up)
- 04 β A/B Testing in SQL (coming up)
- 07 β SCD2 with MERGE (coming up)
- 08 β Performance Tuning (cross-cutting)
Order doesnβt matter; each project folder is self-contained.
EN
- Restore ContosoRetailDW on SQL Server (2019+).
- Open a project folder and run
./sqlscripts in numeric order. - Some projects create views; others return result sets ready to export.
- For tuning, enable
SET STATISTICS IO/TIME ONand capture before/after metrics.
SQL Server 2019+ Β· SSMS / Azure Data Studio Β· ContosoRetailDW (star schema)