This repository contains my SQL portfolio project where I analyze the Northwind database to answer various business-related questions using SQL queries. The project demonstrates my ability to work with a relational database, perform data analysis, and generate insights using SQL.
📂 Dataset # Contains the original datasets used for analysis.
📂 Outputs # Contains the result of SQL queries saved as CSV files.
📄 retailAnalysis.sql # SQL queries used for data analysis.
The queries in this project aim to answer the following business questions:
- What is the total number of orders placed by all customers?
- How many products are available in each category?
- Who are the top customers contributing the most revenue to the business?
- Which products are the most frequently sold?
- What is the frequency of customer orders by location, and how does it vary across regions?
- What is the average shipping time for orders in each region, and how consistent are these shipping times across different cities?
- Which products generate the highest revenue, and how does this compare to their sales volume?
- Which employee is responsible for handling the most orders, and what is their overall performance?
- What is the total revenue generated by each region, and what are the top-performing products in each region?
- How does the total revenue differ between orders with discounts and those without discounts? Does applying discounts lead to an overall increase in revenue?
- What percentage of all orders include a discount, and how does this vary by region?
Each question corresponds to a CSV file in the Outputs folder. The files are named output1.csv
, output2.csv
, etc.
To replicate this project on your system, follow these steps:
- Clone the repository
git clone https://github.com/yourusername/sql-portfolio.git
- Load the Northwind database into your SQL environment (e.g., MySQL Workbench, SQL Server, PostgreSQL, etc.).
- Run the queries in
retailAnalysis.sql
file to generate the results. - The results of the queries will be saved in the Outputs folder as CSV files.
For each question, I have conducted an analysis of the data and provided insights based on the results. These insights are available in the Outputs folder, where the processed data is displayed.
- SQL (MySQL, PostgreSQL, MariaDB, etc.)
- MySQL Workbench (for running queries)
- CSV (for storing and sharing the output)
This project is open-source and available under the MIT License.
💡 If you find this project helpful, feel free to ⭐ the repository and contribute!