This project focuses on converting an Amazon retail sales dataset into a normalized relational database and performing analytical SQL queries to uncover business insights.
- Convert cleaned retail dataset into a relational database schema
- Normalize data into 3rd Normal Form (3NF)
- Execute analytical SQL queries for sales insights
- Generate ER diagram & supporting visuals
| File Name | Description |
|---|---|
| Amazon Sale Report.csv | Original raw dataset |
| Cleaned_Amazon_Sale_Report.csv | Cleaned and preprocessed dataset (used for database loading) |
| sales.db | Final SQLite database containing normalized 3NF tables |
| sql_queries.ipynb | Jupyter Notebook with: ✔ Table creation scripts ✔ Data insertion ✔ Analytical SQL queries ✔ Validation outputs |
| ER Diagram.png | Entity Relationship Diagram of the database |
| Query1.jpg | Screenshot: Top-selling products by month |
| Query2.jpg | Screenshot: Sales by region (JOIN + GROUP BY) |
| Query3.jpg | Screenshot: Customers with spend > ₹5000 |
Normalized tables created:
- Customers
- Products
- Orders
- OrderDetails
Ensures:
✔ No duplicate customer/product details
✔ Referential integrity enforced via Primary/Foreign Keys
✔ Scalable & efficient analytical querying
Full ERD available in
ER Diagram.png
Tables & relationships:
Customers 1 ────∞ Orders 1 ────∞ OrderDetails ∞──── 1 Products
✔ Top-selling product by month
✔ Sales by region using JOIN + GROUP BY
✔ Customers with total spend > threshold using HAVING clause
| Component | Technology |
|---|---|
| Database | SQLite |
| Querying | SQL |
| Processing | Python + Pandas |
| Visualization | Built-in Jupyter screenshot capture |
- Product sales volumes peak in specific months for top categories
- Maharashtra & Karnataka lead in total order revenue
- High-value repeat customers generate majority of profit
These insights can support targeted promotions and stock planning.
- Open
sql_queries.ipynbto view database creation and query execution - Explore
sales.dbusing any SQLite viewer (DBeaver, DB Browser) - View
ER Diagram.pngand screenshots for query evidence



