In this project, I connected to the AdventureWorksDW database using Python and performed exploratory data analysis (EDA) by querying the database with SQL. The AdventureWorksDW database is a sample database from Microsoft that simulates a fictional company's sales data.
As a data analyst, I possess expertise in Python, SQL, and data analysis. I leveraged Python's pandas library to manipulate and analyze the data, and used pyodbc to connect to the AdventureWorksDW database. My skills in both Python and SQL allowed me to perform in-depth analysis of the data and gain valuable insights.
In my GitHub repository Python_with_SQL_for_AdventureWorksDW_Database_Data_Analysis, you will find the following:
-
README.md
: Provides an overview of the project, its objectives, and instructions on how to run the code. -
analysis.ipynb
: A Jupyter Notebook containing the Python code for connecting to the database, executing SQL queries, and performing exploratory data analysis. -
data/
: Contains the necessary .env file to securely store the database credentials.
Throughout the analysis, I answered the following 10 business questions:
- Find the top 5 customers with the highest total sales amount.
- Calculate the total revenue generated by each product category.
- Identify the top 3 salespeople based on the number of orders they have processed.
- Calculate the total profit for each subcategory of products.
- Determine the average order processing time for each month in a given year.
- Find the top 10 most popular products based on the number of units sold.
- Calculate the average discount percentage offered for each product category.
- Identify the customers who have made purchases in all the available sales territories.
- Find the top 5 products that have experienced the highest growth in sales revenue over the last quarter.
- Calculate the total revenue generated by each customer for each quarter of the year.
Feel free to explore the code and analysis in the Jupyter Notebook provided in the repository. If you have any questions or suggestions, please don't hesitate to reach out. Happy exploring!
This project showcases my ability to leverage Python and SQL for data analysis, providing valuable insights into the AdventureWorksDW database. I hope you find the analysis informative and insightful. Enjoy!