This project presents a business-oriented SQL analysis of the Northwind database, designed to transform transactional data into meaningful business insights.
Rather than treating SQL as a collection of isolated exercises, the project is structured around practical analytical questions related to:
- Customer performance
- Product performance
- Product categories
- Revenue contribution
- Sales trends
- Seasonality
- Business KPIs
Each analytical workflow follows a business-oriented structure:
Business Question β SQL Query β Finding β Interpretation β Business Value
The objective is to demonstrate how SQL can be used as an analytical tool to support data-driven business decision-making.
The analysis was designed to answer questions such as:
- Which customers generate the highest revenue?
- Which products generate the highest revenue?
- Which products sell the largest number of units?
- Which product categories contribute the most to total revenue?
- How concentrated is revenue across customers and products?
- How does revenue evolve over time?
- Which months generate the strongest sales performance?
- Are there recurring seasonal patterns in the business?
- How can transactional data be transformed into actionable business insights?
- SQL
- SQLite
- Python
- Pandas
- Matplotlib
- Jupyter Notebook
- Data Analysis
- Business Intelligence
- Data Aggregation
- Table Joins
- Common Table Expressions (CTEs)
- Window Functions
- CASE Expressions
- Date Functions
- NULL Handling
- KPI Analysis
- Revenue Analytics
- Time-Series Analysis
- Percentage Calculations
- Business Reporting
- Data Visualization
- Analytical Storytelling
Database: Northwind
Northwind is Microsoft's classic sample database representing the operations of an international trading company.
The database includes information about:
- Customers
- Orders
- Order Details
- Products
- Categories
- Employees
- Suppliers
- Shippers
These relational tables make it possible to analyze the company from multiple business perspectives using SQL joins, aggregations, and analytical calculations.
The customer analysis identifies the accounts generating the greatest contribution to company revenue.
Key questions include:
- Which customers generate the highest revenue?
- How concentrated is revenue among the largest customers?
- Does the company depend heavily on a small number of accounts?
The analysis shows that B's Beverages is the highest-revenue customer, while revenue among the leading customers remains relatively distributed rather than being dominated by a single account.
Product-level analysis evaluates which products generate the greatest commercial impact.
The analysis includes:
- Revenue by product
- Units sold
- Product rankings
- Contribution to company sales
The ranking highlights the products responsible for the largest contribution to total net revenue after discounts.
Product categories were analyzed from several perspectives:
- Total revenue
- Sales volume
- Product portfolio size
- Revenue contribution
- Average revenue per product
Beverages is the highest-revenue category, representing approximately 20.55% of total company revenue.
Despite its leading position, revenue remains relatively balanced across the main product categories.
Time-based analysis was performed to understand how company revenue evolves throughout the available sales history.
The analysis includes:
- Annual revenue
- Monthly revenue
- Quarterly performance
- Peak revenue periods
- Average revenue by calendar month
- Seasonal patterns
Monthly revenue remains relatively stable across much of the available history, although several periods show stronger sales performance.
The first and final years contain partial data and should therefore be interpreted carefully when making year-over-year comparisons.
Average revenue was calculated by calendar month to identify recurring seasonal patterns.
December records the highest average monthly revenue, while February records the lowest.
This suggests a moderate seasonal pattern, with stronger commercial performance toward the end of the year.
The project demonstrates practical use of SQL concepts commonly required in Data Analytics and Business Intelligence roles.
- SELECT statements
- WHERE conditions
- ORDER BY
- Filtering and sorting
- SUM
- AVG
- COUNT
- GROUP BY
- Percentage calculations
- Business KPI calculations
- INNER JOIN
- LEFT JOIN
- Multi-table queries
- Common Table Expressions (CTEs)
- Window Functions
- CASE expressions
- Date functions
- NULL handling
- Ranking calculations
- Multi-level aggregations
- Revenue analysis
- Customer ranking
- Product ranking
- Category contribution
- Time-series analysis
- Seasonal analysis
- KPI reporting
SQL query results were imported into Python using Pandas and visualized with Matplotlib.
This creates a workflow combining:
Relational Database β SQL Analysis β Python β Visualization β Business Insight
The visualizations allow query results to be communicated more effectively to non-technical stakeholders and provide additional context for business interpretation.
The analysis reveals several important patterns in the Northwind business:
- Revenue is distributed across multiple major customers rather than being overwhelmingly dependent on a single account.
- B's Beverages represents the highest-revenue customer in the analyzed dataset.
- Product revenue is concentrated among a group of leading products.
- Beverages is the strongest product category, contributing approximately 20.55% of total revenue.
- Revenue distribution across major categories remains relatively diversified.
- Monthly revenue shows recurring fluctuations rather than a constant linear trend.
- December produces the highest average revenue among calendar months.
- February records the lowest average monthly revenue.
- The data suggests moderate seasonality, with stronger performance toward the end of the year.
- Partial years should not be compared directly with complete years without controlling for the available observation period.
These findings demonstrate how SQL analysis can move beyond data extraction and support commercial performance evaluation and business decision-making.
Project_03_SQL_Business_Analysis/
β
βββ database/
β
βββ queries/
β βββ 01_learning/
β βββ 02_business_questions/
β βββ 01_top_customers.sql
β βββ 02_product_performance.sql
β βββ 03_category_analysis.sql
β βββ 04_sales_trends.sql
β
βββ notebooks/
βββ images/
βββ README.md
βββ projects_notes.md
βββ requirements.txt
βββ .gitignore
- Clone the repository.
- Open the project in Visual Studio Code.
- Open the Northwind SQLite database.
- Execute the SQL scripts located in:
queries/02_business_questions/
The business-oriented SQL files are structured around:
- Business Question
- SQL Solution
- Finding
- Interpretation
- Business Value
The visualization notebook can then be used to transform SQL outputs into charts for analytical reporting.
This project demonstrates the development of a complete SQL-based business analysis workflow, from relational database exploration and query development to KPI analysis, visualization, interpretation, and business reporting.
The project demonstrates practical skills in:
- SQL querying
- Relational database analysis
- Multi-table joins
- Data aggregation
- CTEs
- Window functions
- KPI calculations
- Customer analysis
- Product analysis
- Revenue analysis
- Time-series analysis
- Seasonal analysis
- Python-based visualization
- Business insight generation
- Analytical storytelling
Most importantly, the project demonstrates the ability to use SQL to answer real business questions rather than simply retrieve data.
As Project 03 of the portfolio, it expands the analytical foundation developed in Projects 01 and 02 by introducing a stronger focus on relational databases, SQL analytics, and Business Intelligence.
Martin Panelo
Data Analyst | Geophysicist | Scientific Computing
Analytical professional combining data analytics, scientific computing, and geoscience experience, with a focus on Python, SQL, Power BI, data visualization, and business-oriented problem solving.
- GitHub: PaneloMartin
- LinkedIn: Martin Panelo




