https://github.com/evanmathew/northwind-traders
SQL-powered analysis of sales, employee performance, and customer behavior using PostgreSQL window functions. This project uncovers key business insights to optimize decision-making.
https://github.com/evanmathew/northwind-traders
case-study data-analysis jupyter-notebook northwind-traders postgresql python-postgresql sql
Last synced: 4 months ago
JSON representation
SQL-powered analysis of sales, employee performance, and customer behavior using PostgreSQL window functions. This project uncovers key business insights to optimize decision-making.
- Host: GitHub
- URL: https://github.com/evanmathew/northwind-traders
- Owner: evanmathew
- Created: 2025-02-11T15:05:01.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-02-13T16:19:24.000Z (10 months ago)
- Last Synced: 2025-05-29T20:35:54.845Z (6 months ago)
- Topics: case-study, data-analysis, jupyter-notebook, northwind-traders, postgresql, python-postgresql, sql
- Language: Jupyter Notebook
- Homepage:
- Size: 450 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Northwind Traders Data Analysis Project
## Scenario
You are a Data Analyst at Northwind Traders, an international gourmet food distributor. Management relies on data-driven insights to make strategic decisions across multiple areas of the business. This project focuses on:
- ✅ Evaluating Employee Performance – Identifying key contributors to improve productivity.
- ✅ Understanding Product & Category Sales – Optimizing inventory and marketing strategies.
- ✅ Analyzing Sales Growth – Monitoring trends, tracking company progress, and forecasting demand.
- ✅ Evaluating Customer Purchase Behavior – Targeting high-value customers with promotional incentives.
Using PostgreSQL window functions, you will generate these essential insights, helping management drive better business decisions.
## Database Schema
To build efficient SQL queries, referencing the database schema is essential. The Northwind database contains over a dozen tables, but for this project, we focus only on the most relevant ones.
📌 Below is a modified schema diagram highlighting the necessary tables for analysis:
(If you're curious about the full schema, refer to the original [Northwind_schema](ER.png).
## Technologies Used
PostgreSQL – Querying and analyzing structured data
SQL Window Functions – Advanced analytics for ranking, cumulative sales, and trend tracking
Jupyter Notebook – Running queries and visualizing data
Python (psycopg2 & pandas) – Query execution and data manipulation
Key SQL Techniques Used
- 🟢 Window Functions (ROW_NUMBER(), RANK(), DENSE_RANK(), SUM() OVER(), AVG() OVER())
- 🟢 Common Table Expressions (CTEs) (WITH category_sales AS (...))
- 🟢 Aggregations & Joins (SUM(), COUNT(), JOIN)
- 🟢 Date Functions (DATE_TRUNC(), EXTRACT())