Walmart Sales Performance Analysis using Advanced MySQL
This project focused on extracting and analyzing sales, customer, and product data from Walmart stores to uncover performance trends and actionable insights. Using Advanced MySQL techniques — including Common Table Expressions (CTEs), window functions (LAG, RANK, DENSE_RANK), CASE statements, and subqueries — multiple business questions were addressed. The analysis covered monthly branch growth, profit margins by product line, customer spending tiers, anomalies in sales, preferred payment methods, repeat purchases, and sales distribution by demographic and time-based factors.
Tools & Technologies Used: MySQL, Window Functions, CTEs, SQL Joins, Aggregate Functions, Data Segmentation Techniques
Key Outcomes:
Identified Branch A as the top performer with the highest consistent monthly growth rate.
Determined Food and Beverages as the most popular product line among member customers.
Ranked product lines and branches by profit margin for strategic focus.
Segmented customers into spending tiers and identified repeat purchasers within a 30-day window.
Found that female customers generated higher revenue compared to males.
Determined the most frequently used payment methods per city and peak sales days of the week.
Impact:
The insights enabled Walmart’s management to prioritize high-growth branches, focus marketing efforts on profitable product lines, and improve retention strategies for high-value and repeat customers. Operational decisions, such as stocking preferences and targeted promotions, could be tailored to the most profitable demographics, regions, and purchase patterns — ultimately enhancing sales performance and customer satisfaction.