This project explores Amazon product and user data using SQL, with the goal of understanding product categories, user purchasing behavior, and discounts.
The analysis focuses on:
- How products are distributed across categories
- How actively users purchase items
- How much users save through discounts
- Differences between declared and real discounts
- How stable or variable discounts are across categories
The analysis is based on a table named amazon with the following fields:
categoryuser_iduser_nameactual_pricediscounted_pricediscount_percentage
Prices are stored as strings (e.g. ₹1,299) and are cleaned during the analysis.
-
Category Analysis
- Count of products per category
-
User Activity
- Number of purchased items per user
-
User Savings Segmentation
- Total spending vs discounted spending
- Classification of users based on savings behavior
-
Discount Analysis
- Comparison between declared and real discounts per category
-
Variance Analysis
- Discount rate variability across categories
- Savings amount variability across categories
- SQL is used for all data processing and analysis.
- A database view is created to clean and convert price fields into numeric values.
- Variance is calculated using the formula: VAR(x)=AVG(x^2)-(AVG(x))^2
This project was created to practice SQL analytics, data cleaning, and basic business-oriented analysis on real-world styled e-commerce data.