The repository contains analytical SQL queries and reporting views designed for generating actionable insights from sales, customer, and product data.
The analysis focuses on:
-
Understanding sales trends over time
-
Measuring business performance
-
Evaluating category contribution
-
Segmenting customers and products
-
Building reporting views for business stakeholders
The customer reporting view consolidates customer metrics and behavior.
- Total Orders
- Total Sales
- Total Quantity Purchased
- Total Products Purchased
- Customer Lifespan
- Recency
- Average Order Value (AOV)
- Average Monthly Spend
- VIP Customers
- Regular Customers
- New Customers
Additional demographic segmentation includes age-group analysis.
The product reporting view consolidates product performance metrics.
- Total Orders
- Total Sales
- Total Quantity Sold
- Total Customers
- Product Lifespan
- Recency
- Average Selling Price
- Average Order Revenue
- Average Monthly Revenue
Products are classified into:
- High-Performers
- Mid-Range Performers
- Low-Performers
- Common Table Expressions (CTEs)
- Window Functions
- Running Totals
- Moving Averages
LAG()- Aggregations
CASEExpressions- Date Functions
- How do sales evolve over time?
- How many customers are active each month?
- What is the cumulative revenue trend?
- Which products outperform historical averages?
- Which categories contribute most to revenue?
- How can customers be segmented based on spending behavior?
- Which products generate the highest revenue?
- Which KPIs should be monitored for customers and products?
- Percentage Contribution Analysis
- Reporting Views