Comprehensive sales forecasting and demand prediction analysis using SQL queries and statistical correlation analysis
A comprehensive data analysis project focused on predicting Walmart sales and demand patterns using historical data from 45 stores across different regions. The analysis incorporates economic factors, seasonal trends, and holiday impacts to develop accurate forecasting models.
Walmart faces challenges with unforeseen demands leading to stock-outs due to inappropriate ML algorithms. The goal is to predict demand accurately by incorporating economic conditions and promotional markdown events.
Historical sales data covering February 2010 to November 2012, including weekly sales, holiday flags, temperature, fuel prices, CPI, and unemployment rates across 45 store locations.
Analysis of four major holidays (Super Bowl, Labour Day, Thanksgiving, Christmas) which are weighted five times higher in evaluation, plus economic factor correlations.
SQL-based correlation analysis, holiday impact assessment, sales decline tracking, and economic factor evaluation to identify patterns and predictive indicators.
Historical sales data from 45 Walmart stores with economic and environmental factors
Loading data table...
Comprehensive SQL queries analyzing holiday impacts, economic correlations, and sales trends
Compares different types of holidays and non-holiday weeks with total weekly sales and average weekly sales to analyze their sales performance based on holidays.
Holiday_Name | Total_Weekly_Sales | Avg_Weekly_Sales |
---|---|---|
Non-Holiday | $6,231,919,000 | $1,041,256.38 |
Super Bowl | $145,682,300 | $1,079,127.99 |
Labor Day | $140,727,700 | $1,042,427.29 |
Thanksgiving | $132,414,600 | $1,471,273.43 |
Christmas | $86,474,980 | $960,833.11 |
Compares different types of holidays with average CPI, average unemployment, and total sales to identify economic factors impacting holiday sales performance.
Holiday_Name | Avg_CPI | Avg_Unemployment | Total_Sales |
---|---|---|---|
Super Bowl | 170.63 | 8.14% | $145,682,300 |
Labor Day | 172.11 | 7.92% | $140,727,700 |
Thanksgiving | 170.98 | 8.14% | $132,414,600 |
Christmas | 171.26 | 8.14% | $86,474,980 |
Takes the weekly sales and previous weekly sales to create a sales change metric, allowing Walmart to analyze stores whose sales have declined significantly week-over-week.
Top 10 Largest Sales Declines:
Store | Date | Weekly_Sales | Sales_Change |
---|---|---|---|
14 | 2010-12-31 | $1,623,716.46 | -$2,194,969.99 |
10 | 2010-12-31 | $1,707,298.14 | -$2,041,759.55 |
20 | 2010-12-31 | $1,799,737.79 | -$1,966,949.64 |
13 | 2010-12-31 | $1,675,292.00 | -$1,920,611.20 |
4 | 2010-12-31 | $1,794,868.74 | -$1,731,844.65 |
Total of 3,258 records showing week-over-week sales declines across all stores and time periods.
Correlation analysis between weekly sales and multiple factors (temperature, fuel price, CPI, unemployment, and holidays) to identify which variables most influence Walmart sales performance.
Temperature | Fuel Price | CPI | Unemployment | Holiday Flag |
---|---|---|---|---|
-0.06 | 0.01 | -0.07 | -0.11 | 0.04 |
Critical business insights derived from the comprehensive SQL analysis of Walmart sales data