https://github.com/sinhasomya100/task-3
SQL for Data Analysis Use SQL queries to extract and analyze data from a database
https://github.com/sinhasomya100/task-3
excel-csv joins kaggle-dataset mysql mysql-database query
Last synced: 9 months ago
JSON representation
SQL for Data Analysis Use SQL queries to extract and analyze data from a database
- Host: GitHub
- URL: https://github.com/sinhasomya100/task-3
- Owner: sinhasomya100
- Created: 2025-04-10T12:34:00.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-04-13T08:02:51.000Z (9 months ago)
- Last Synced: 2025-04-13T08:40:52.999Z (9 months ago)
- Topics: excel-csv, joins, kaggle-dataset, mysql, mysql-database, query
- Homepage:
- Size: 1000 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
π eCommerce Sales Data Analysis using MySQL
Welcome to my SQL-based data analysis project where I dive deep into **sales trends, customer behavior, product performance, and order insights** using a self-created **eCommerce database**. This project was developed as part of my Data Analyst internship to simulate real-world retail data problems and solve them through SQL.
---
π¦ Dataset: `ecommerce_big`
This project revolves around a mock **eCommerce platform** database that closely resembles platforms like **Amazon**, **Flipkart**, or **Shopify**. The database includes 4 core tables:
| Table Name | Description |
|----------------|--------------------------------------------------|
| `customers` | Contains customer details like name and email |
| `products` | Product catalog with names, categories, and price|
| `orders` | Transaction data including order dates and IDs |
| `order_items` | Line items of each order: quantity & product info|
π· Screenshots showing the structure of these tables can be found in the `screenshots/` folder.
---
βοΈ Technologies Used
- **MySQL Workbench** β SQL Querying and database creation
- **SQL (DDL + DML + Queries)** β Data definition and data manipulation
- **Windows 11** β Local development environment
---
π― Objectives
The core aim of this project was to:
- Understand how relational databases work in an eCommerce context
- Perform data extraction, transformation, and analysis via SQL
- Gain practical experience with real-world business scenarios
---
π Key Analytical Tasks
Each SQL file addresses a key eCommerce metric or analysis scenario, such as:
- π **Top-selling products**
- π₯ **Repeat customers**
- πΈ **Total revenue by date/category**
- π¦ **Average items per order**
- π΅οΈββοΈ **Customer insights**
These were done using advanced SQL techniques like:
- `JOINs`
- `GROUP BY`
- `HAVING`, `WHERE`
- Subqueries & Nested Selects
- Aggregate functions (`SUM`, `COUNT`, `AVG`)
---
π§ Business Insights Extracted
A few real-world learnings simulated from this dataset:
1. **High-value customers** contribute to a large chunk of sales β supporting Paretoβs 80/20 rule.
2. Certain products consistently outperform in terms of both units sold and revenue β useful for inventory planning.
3. **Order quantity patterns** indicate bulk purchasing behavior during specific periods (e.g., festive seasons).
---
π Files in this Repo
| File Name | Description |
|------------------------|-------------------------------------------------|
| `task3_queries.sql` | All SQL queries written during the analysis |
| `README.md` | Project overview and context |
| `screenshots/` | MySQL Workbench screenshots for submission |
---
π Notes
- The database was manually built using raw SQL (DDL + DML) to simulate a real-world eCommerce schema.
- All screenshots are included to validate the structure and execution of each query.
- The project assumes **one order can have multiple items** (i.e., 1-to-many relationship between `orders` and `order_items`).
---
π¨βπ» Author
Somya Sinha
Aspiring Data Analyst | SQL Enthusiast | Excel & Power BI Learner
π www.linkedin.com/in/somyasinha100
π§ somyasinha615@gmail.com
---
> π¬ βData is the new oil. SQL is the engine that refines it.β
> β Inspired by real-world analysts building smarter ecommerce systems