Skip to content

Exploration of business questions for a wholesale food company using PostgreSQL

License

Notifications You must be signed in to change notification settings

cbjonesea/NorthwindTraders_SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project Description

The included SQL script aims to answer business questions from the Northwind Traders database, a database of customer, order, product and employee data for a wholesale gourmet food company called Northwind Traders.

The aim of the project was to ask questions and use the data to find answers related to the following themes:

  1. Evaluating employee performance to boost productivity,
  2. Understanding product sales and category performance to optimize inventory and marketing strategies.
  3. Analyzing sales growth to identify trends, monitor company progress, and make more accurate forecast.
  4. Evaluating customer purchase behavior to target high-value customers with promotional incentives

The following questions related to these themes are answered in the script:

  1. Employee performance
    1. Which employees have performed the best in terms of sales?
  2. Product sales and category performance
    1. Which products and categories are sold most often?
    2. Which products generate the most revenue?
  3. *Sales trends
    1. Which periods of the year account for the highest and lowest revenue?
  4. Customer purchase behavior
    1. Which products are commonly bought together?
    2. Which customers return most often?
    3. What is the average number of items per order?

Database Schema

Alt text

Getting Started

The SQL script was written based on the PostgreSQL version of the Northwind Traders database.

You will need to have PostgreSQL installed on your local machine.

You will also need to download and populate the Northwind Traders database locally.

The Northwind Traders database is available on Github and there are instructions for downloading and installing both PostgreSQL and the database here

Prerequisites

Once you have downloaded and installed PostgreSQL and poopulated the Northwind Traders database locally, you will need to choose a program to open and view the database tables and run the SQL script from this repository.

I used DBeaver for my database management and script writing, but other options include JupyterLab, BeeKeeper Studio, etc.

DBeaver is available for download, with installation instrcutions, here.

Usage

The SQL script contains multiple queries.

It is commented to indicate which queries are useful to answer each question (Q1, Q2, etc.).

Queries can be run individually in a database tool, such as DBeaver, by dragging and selecting an individual entire query before executing. Multiple queries can not be run together.

Roadmap

Questions answered in the current script:

  • Q1) Which employees have performed the best in terms of sales?
  • Q2) Which products and categories are sold most often?
  • Q3) Which products generate the most revenue?
  • Q4) Which periods of the year account for the highest and lowest revenu
  • Q5) Which products are commonly bought together?
  • Q6) Which customers return most often?
  • Q7) What is the average number of items per order?

Questions for future updates:

  • [] Q8) What are the most common products in the Top 20 orders by value?
  • [] Q9) What is the average length of time between a customer placing an order and the ship date?

License

Distributed under the MIT License. See LICENSE.txt for more information.

About

Exploration of business questions for a wholesale food company using PostgreSQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published