All projects

Customer Segmentation and Sales Analysis

Click an image to zoom.

Overview

This project involved using SQL to perform customer segmentation and sales analysis for an online retail dataset. It included calculating monthly sales growth, analyzing product sales trends, evaluating sales volume by country, and computing the monthly churn rate. The primary focus was on segmenting customers based on their purchasing behaviors, including recency, frequency, and monetary value (RFM) scores. Using advanced SQL queries, I categorized customers into segments like "Champions," "Loyal Customers," and "At Risk" to inform targeted marketing strategies and improve customer retention.

Key Features

  • Monthly Sales Growth Analysis: Calculated and visualized the monthly sales growth for overall sales and for each individual product, using the LAG window function to compare sales data month over month.
  • Sales Volume by Country: Analyzed total sales and sales volume percentages across different countries, helping identify regions with the highest sales contributions.
  • Monthly Churn Rate Calculation: Computed the churn rate for each month based on customer activity and segment classification, identifying trends in customer retention and attrition.
  • Customer Segmentation (RFM Model): Segmented customers into categories (e.g., Champions, Loyal Customers, At Risk) based on their recency, frequency, and monetary values. This was achieved by calculating each customer’s activity score and matching them to predefined segment groups.