This project analyzes e-commerce sales data to extract actionable insights and generate professional visualizations. It showcases data cleaning, exploratory data analysis (EDA), and key trends in sales, revenue, and product performance.
- Python 3.8+
- Pandas
- MySQL
- SQL
- python-dotenv
- Seaborn
- Matplotlib
-
Data Cleaning
- Removed missing values
- Filtered out negative quantities (returns)
- Created a revenue column
-
Data Loading
- Loaded cleaned data into MySQL database
-
Data Analysis
- Executed advanced SQL queries to analyze:
- Revenue
- Customers
- Products
- Sales trends
- Executed advanced SQL queries to analyze:
-
Insights Generation
- Extracted actionable business insights
ecommerce-sql-analysis/
├── data/
│ ├── data.csv
│ └── clean_data.csv
├── assets/
│ ├── revenue_by_country.png
│ ├── top10_products_quantity.png
│ ├── profit_vs_revenue.png
│ ├── sales_over_time.png
│ └── revenue_distribution.png
├── src/
│ ├── clean_data.py
│ ├── load_data.py
│ └── db_connection.py
├── sql/
│ └── queries.sql
├── insights/
│ └── insights.md
├── schema.sql
└── README.md
- Install dependencies:
pip install -r requirements.txt- Create MySQL database:
CREATE DATABASE ecommerce_analysis;- Run cleaning script:
python src/clean_data.py- Load data:
python src/load_data.py- Run SQL queries in MySQL
- Revenue analysis
- Customer segmentation
- Product performance
- Sales trends
- Geographic insights
- Real-world dataset
- End-to-end data pipeline
- Advanced SQL queries
- Business insights generation
This project demonstrates practical data analysis skills for real-world freelance and business scenarios.
- X-axis labels and figure sizes are optimized for readability.
- All figures are saved as high-resolution PNGs.
- Ready to showcase on GitHub, Upwork portfolio, or presentations.
If you like this project, feel free to star the repository!




