This project is an extension of my SQL Data Warehouse Project, which built the foundational Medallion architecture (Bronze → Silver → Gold).
, this project leverages the Gold Layer views created in the Medallion architecture (Bronze → Silver → Gold).
The goal is to perform advanced analytical exploration on business-ready data to generate actionable insights — forming an “Owner Avatar” that represents the business’s most valuable customer and product segments.
This analytics layer builds directly upon:
- The Gold Layer fact and dimension views from the main SQL Data Warehouse Project.
- Uses cleaned, validated, and modeled data (customers, products, and sales) to generate analytical insights.
- Focuses entirely on analysis and storytelling using SQL, not ETL or data transformations.
Transform Gold Layer data models into actionable business insights through analytical SQL — uncovering:
- Customer behavior and engagement trends
- Product performance patterns
- Sales performance evolution over time
- Market segmentation and ranking dynamics
This forms the analytical foundation for decision-making and business intelligence reporting.
- Identify customer segments based on recency, frequency, and monetary behavior.
- Analyze loyalty and churn risk by profiling spend and interaction trends.
- Measure product performance through sales contribution, volume, and margin.
- Highlight key SKUs driving revenue or requiring optimization.
- Track sales growth using change-over-time and cumulative measures.
- Evaluate business KPIs such as average order value, growth rate, and retention.
- Segment customers or products by revenue contribution and magnitude.
- Use ranking analysis to spotlight top performers and underperforming areas.
- Source: Gold Layer fact and dimension views from SQL Data Warehouse Project
- Technology: T-SQL (SQL Server)
- Focus: Analytical SQL (Window functions, CTEs, aggregation, ranking, and ratio analysis)
- Scope: Data storytelling and analytical queries — no data ingestion or schema creation
SQL_DataWarehouse_Analytics_Project/
│
├── customer_profile.sql # Customer demographics, segments, and engagement patterns
├── product_profile.sql # Product-level KPIs, pricing & performance metrics
├── performance_analysis.sql # Overall sales performance analysis
├── change_over_time_analysis.sql # Trend & time-series exploration
├── cumulative_analysis.sql # Rolling and cumulative measures
├── data_segmentation.sql # Customer or product segmentation logic
├── magnitude_analysis.sql # Contribution and magnitude-based comparisons
├── measures_exploration.sql # KPI breakdowns and derived measures
├── part_to_whole_analysis.sql # Ratio and share-based calculations
├── ranking_analysis.sql # Rank-based insights (top customers, products, etc.)
│
└── Readme.txt # Documentation for the analytics layer
- Advanced SQL for analytics (CTEs, ranking, ratio, cumulative calculations)
- Data storytelling using business-ready datasets
- Analytical design patterns like segmentation, part-to-whole, and time-trend analysis
- Model reusability — extending the Gold Layer for business intelligence
- Version control and documentation for analytical workflows
| Analysis Type | Example Insight |
|---|---|
| Customer Profile | Top 15% of customers contribute nearly 70% of total sales. |
| Product Profile | Mid-tier products show higher repeat purchase rates. |
| Performance Analysis | 2024 Q2 sales rose by 23% after process optimization. |
| Segmentation | Customers segmented into 4 groups based on purchase frequency and value. |
- Clone or download this repository.
- Connect it to the same SQL Server instance used in the Data Warehouse project.
- Run the
.sqlscripts sequentially on the Gold Layer database. - Export or visualize query outputs in Power BI or Excel for reporting.
Shivam Kumar
Data Analyst | Writer
Building bridges between data pipelines and human insight.