Skip to content

ManishBokadia/Retail-Sales-SQL-Analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

🛒 Retail Sales SQL Analytics

A complete SQL analytics project built using MySQL to solve real-world retail business problems. This project demonstrates SQL skills required for Data Analyst roles, including aggregations, joins, Common Table Expressions (CTEs), window functions, ranking, and business reporting.


📌 Project Overview

Businesses generate thousands of sales transactions every day. Raw data alone does not provide meaningful insights. This project analyzes retail sales data to answer key business questions that help management make informed decisions.

The project focuses on:

  • Sales Performance Analysis
  • Customer Analytics
  • Product Analytics
  • Window Functions
  • Common Table Expressions (CTEs)
  • ABC Inventory Analysis

🎯 Business Objectives

  • Measure overall sales performance
  • Identify top-performing regions
  • Analyze product category performance
  • Find valuable customers
  • Rank products and customers
  • Track monthly sales trends
  • Classify inventory using ABC Analysis
  • Generate actionable business insights

🗂 Dataset Information

Attribute Details
Database MySQL
Domain Retail Sales
Dataset Retail Sales Transactions
Analysis Type Business Analytics
Project Level Data Analyst Portfolio

🛠 Tools & Technologies

  • MySQL
  • SQL
  • MySQL Workbench
  • Git
  • GitHub

📚 SQL Concepts Demonstrated

  • SELECT
  • WHERE
  • GROUP BY
  • HAVING
  • ORDER BY
  • Aggregate Functions
  • CASE Statements
  • Common Table Expressions (CTEs)
  • Window Functions
  • ROW_NUMBER()
  • RANK()
  • DENSE_RANK()
  • LAG()
  • LEAD()
  • SUM() OVER()
  • Running Totals
  • Percentage Contribution
  • ABC Analysis

📂 Repository Structure

Retail-Sales-SQL-Analytics │ ├── Dataset │ └── Retail_sales.csv │ ├── SQL Queries │ ├── 01_Sales_Analysis.sql │ ├── 02_Customer_Analysis.sql │ ├── 03_Product_Analysis.sql │ ├── 04_Window_Functions.sql │ ├── 05_CTE_Analysis.sql │ └── 06_ABC_Analysis.sql │ ├── Images │ └── README.md


📈 SQL Modules

1️⃣ Sales Analysis

  • Total Sales
  • Sales by Region
  • Sales by Category
  • Monthly Sales Trend
  • Regional Contribution
  • Running Sales Total

2️⃣ Customer Analysis

  • Top Customers
  • Customer Ranking
  • Regional Top Customers
  • Customer Contribution
  • Average Order Value
  • Above Average Customers

3️⃣ Product Analysis

  • Best Selling Products
  • Lowest Selling Products
  • Product Ranking
  • Product Contribution
  • Category Leaders
  • Above Average Products

4️⃣ Window Functions

  • ROW_NUMBER()
  • RANK()
  • DENSE_RANK()
  • LAG()
  • LEAD()
  • Running Totals

5️⃣ CTE Analysis

  • Single CTE
  • Multiple CTEs
  • Sales Growth
  • Category Contribution
  • Top Products
  • Region Analysis

6️⃣ ABC Analysis

  • Product Sales
  • Running Total
  • Percentage Contribution
  • Product Classification
  • Category A
  • Category B
  • Category C

💼 Key Business Insights

  • Identified the highest-performing sales regions.
  • Measured category-wise revenue contribution.
  • Ranked customers based on sales.
  • Identified top-performing products.
  • Compared monthly sales trends.
  • Classified products using ABC Analysis.
  • Demonstrated advanced SQL techniques for business reporting.

🚀 Skills Demonstrated

  • Data Cleaning
  • Data Aggregation
  • Business Analysis
  • Customer Analytics
  • Product Analytics
  • Sales Analytics
  • SQL Optimization
  • Window Functions
  • CTEs
  • Analytical Thinking

📷 Project Screenshots

The Images folder contains screenshots of SQL query outputs and business insights.

Examples:

  • Total Sales
  • Sales by Region
  • Category Analysis
  • Top Customers
  • ABC Analysis

🔮 Future Improvements

  • Connect MySQL with Power BI
  • Build an interactive dashboard
  • Automate reporting
  • Add stored procedures and views
  • Optimize queries for large datasets

👨‍💻 Author

Manish Bokadia

  • Ex-Data Analyst @ Capgemini
  • B.Tech (Computer Science)
  • SQL | Python | Power BI | Tableau | Machine Learning

⭐ If you found this project useful, consider giving it a Star.

About

Advanced SQL project solving real-world retail business problems using SQL and business analytics.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors