This project showcases the application of advanced SQL for performing in-depth sales analysis. Using a clean dataset from a retail data warehouse, these scripts answer critical business questions related to customer behavior, product performance, and revenue trends.
The analysis is structured into a series of SQL queries, each designed to uncover specific insights:
- Exploratory Data Analysis (EDA): Initial scripts to understand the schema, dimensions, and data distributions.
- KPI Measurement: Calculation of core business metrics, including total revenue, average order value, and customer lifetime value.
- Ranking & Performance: Use of window functions like
RANK()andDENSE_RANK()to identify top-performing products and high-value customers. - Time-Series Analysis: Queries to track cumulative sales and year-over-year growth, revealing seasonal trends.
- Customer Segmentation: Advanced techniques like RFM (Recency, Frequency, Monetary) analysis to group customers into actionable segments.
- Part-to-Whole Analysis: Calculating the contribution of different product categories to overall revenue.
- Primary Language: SQL
- Concepts: Window Functions, Common Table Expressions (CTEs), Subqueries, Joins, Aggregations.