Skip to main content
HomeSnowflake

Course

Window Functions in Snowflake

IntermediateSkill Level
4.8+
432 reviews
Updated 01/2026
Discover Snowflake window functions to solve complex data problems with rankings, partitions, and rolling calculations.
Start Course for Free
SnowflakeData Manipulation3 hr10 videos34 Exercises2,850 XP2,053Statement of Accomplishment

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Group

Training 2 or more people?

Try DataCamp for Business

Course Description

Unlock a slew of new problem-solving tools with the power of Snowflake window functions! In this course, you'll master the tools needed to solve problems like identify outliers in your data and calculate moving averages.First, you'll differentiate between traditional aggregation functions and window functions. You'll nail down the anatomy of a window function by assigning row numbers and rankings to all records in a Snowflake query. Once you've gotten your feet under you, you'll pair these window functions with partitions. This will give you the power to created ordered groups of records, and compare sequential values.You'll wrap up the course with aggregate window functions and rolling averages; two of the most handy applications of window functions for wrangling and analyzing data. When all is said and done, you'll have a whole new skillset that will supercharge your Snowflake queries!

Prerequisites

Data Manipulation in Snowflake
1

Window Functions

Open the window to a world of possibilities with Snowflake window functions! You'll get the ball rolling by differentiating window functions from traditional functions. Then, you'll learn how to provide a row number and ranking for each record in a query. Once you've nailed down the basics, you'll put the "window" in window functions, using PARTITION BY. You'll explore how to find and use the first and last value of a certain window before wrapping up with a sneak peek into aggregation functions.
Start Chapter
2

Ranking Window Functions

Time to crank it up! In this chapter, you’ll take ranking functions to the next level. You’ll start with a variant of RANK, called DENSE_RANK, which handles ties in a bit of a different way. You’ll also explore a more robust version of the functions you saw in the previous lesson using NTH_VALUE. Next, you’ll create “buckets” of data using NTILE, which is more useful than you may think. You’ll also pick up a nifty little tool called CUME_DIST to find the number of records less than or equal to a certain record in a window. You’ll wrap up the chapter with one of the most powerful applications of window functions you’ve seen so far; LAG and LEAD.
Start Chapter
3

Aggregate Window Functions

You’ll start this final chapter with aggregation functions like AVG, COUNT, and SUM. You’ll compare the output of these functions to individual records in a window, as well as to perform additional calculations. After this, you’ll master the most exciting application of window functions; running and moving calculations! You’ll start by calculating running averages and totals for different metrics for electric vehicle charging. Finally, you’ll wrap up the course by generating moving totals and averages with a sliding window!
Start Chapter
Window Functions in Snowflake
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.8
from 432 reviews
88%
12%
0%
0%
0%
  • Aaron
    yesterday

    GREAT course

  • Óscar
    2 days ago

  • chittey
    2 days ago

  • Gabriel
    3 days ago

  • Anjum
    5 days ago

  • Wing
    last week

"GREAT course"

Aaron

chittey

Gabriel

FAQs

Who will benefit from this course?

Data analysts, data engineers, business analysts, and anyone working with Snowflake who needs to perform advanced data analysis tasks like calculating running totals, identifying trends, and comparing sequential values.

What skills do I need to have to join this course?

You should have a basic understanding of SQL and database principles such as JOINs, SELECT, and DISTINCT statements. You should also understand the basics of Snowflake, including how to navigate the UI and create new Snowflake SQL queries.

What practical problems can I solve after completing this course?

You'll be able to identify outliers in datasets, calculate moving averages for trend analysis, rank records within groups, compare sequential values for change detection, and create running totals for cumulative analysis.

Join over 19 million learners and start Window Functions in Snowflake today!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.