SQL Window Functions for Northwind Traders

  • Guided Project
  • 0.3 hours
  • Intermediate
  • SQL

Practice using SQL window functions and CTEs to analyze sales data and drive business decisions.

Overview

In this project, you'll step into the role of a data analyst at Northwind Traders, an international gourmet food distributor. Using PostgreSQL window functions and CTEs on the company's database, you'll analyze various aspects of the business, including employee performance, product sales, category performance, sales growth, and customer purchase behavior. Throughout the project, you'll construct complex SQL queries to calculate metrics, rank data, and identify trends. Your insights will help management make data-driven decisions to boost productivity, optimize inventory and marketing strategies, monitor company progress, and target high-value customers. By the end, you'll have honed your SQL skills and be able to apply these advanced techniques to real-world business scenarios. Objective: Use SQL window functions and CTEs to analyze sales data and provide actionable insights to drive strategic business decisions at Northwind Traders.

What You'll Learn

  • Understand the logic behind window functions and CTEs, and their applications in real-world scenarios
  • Construct SQL queries that use window functions and CTEs to solve complex data analysis tasks
  • Analyze and interpret the results of queries to drive data-informed decisions

Before You Start

  • Querying and filtering data using SELECT and WHERE clauses
  • Defining windows using OVER() and partitioning data with PARTITION BY
  • Performing calculations on groups of rows with aggregate functions
  • Interpreting query results to derive analytical insights from data

Project Steps

9 steps

  1. 1 Introduction
  2. 2 Getting to Know the Data
  3. 3 Ranking Employee Sales Performance
  4. 4 Running Total of Monthly Sales
  5. 5 Month-Over-Month Sales Growth
  6. 6 Identifying High-Value Customers
  7. 7 Percentage of Sales for Each Category
  8. 8 Top Products Per Category
  9. 9 Next Steps

Join 1M+ data learners on Dataquest.

  1. 1

    Create a free account

  2. 2

    Choose a learning path

  3. 3

    Complete exercises and projects

  4. 4

    Advance your career