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.
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
- 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
| Attribute | Details |
|---|---|
| Database | MySQL |
| Domain | Retail Sales |
| Dataset | Retail Sales Transactions |
| Analysis Type | Business Analytics |
| Project Level | Data Analyst Portfolio |
- MySQL
- SQL
- MySQL Workbench
- Git
- GitHub
- 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
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
- Total Sales
- Sales by Region
- Sales by Category
- Monthly Sales Trend
- Regional Contribution
- Running Sales Total
- Top Customers
- Customer Ranking
- Regional Top Customers
- Customer Contribution
- Average Order Value
- Above Average Customers
- Best Selling Products
- Lowest Selling Products
- Product Ranking
- Product Contribution
- Category Leaders
- Above Average Products
- ROW_NUMBER()
- RANK()
- DENSE_RANK()
- LAG()
- LEAD()
- Running Totals
- Single CTE
- Multiple CTEs
- Sales Growth
- Category Contribution
- Top Products
- Region Analysis
- Product Sales
- Running Total
- Percentage Contribution
- Product Classification
- Category A
- Category B
- Category C
- 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.
- Data Cleaning
- Data Aggregation
- Business Analysis
- Customer Analytics
- Product Analytics
- Sales Analytics
- SQL Optimization
- Window Functions
- CTEs
- Analytical Thinking
The Images folder contains screenshots of SQL query outputs and business insights.
Examples:
- Total Sales
- Sales by Region
- Category Analysis
- Top Customers
- ABC Analysis
- Connect MySQL with Power BI
- Build an interactive dashboard
- Automate reporting
- Add stored procedures and views
- Optimize queries for large datasets
Manish Bokadia
- Ex-Data Analyst @ Capgemini
- B.Tech (Computer Science)
- SQL | Python | Power BI | Tableau | Machine Learning