Our website uses cookies. By using this website, you agree to their use in accordance with the browser settings. You can modify your browser settings on your own. For more information see our Privacy Policy.


Interactive Course

Window Functions in MS SQL Server

Learn how to use analytic T-SQL functions to deeply understand data.

Table of contents

Ultimate money saver


With our Forever plan this course will cost you only

$ 4.37

85% OFF

40 hours left


Interactive exercises

20 h

Estimated time


Users enrolled


15 ratings


T-SQL window functions – also known as windowing functions, OVER functions, or analytic functions – are tremendously useful. These functions make building complex aggregations much simpler. In this step-by-step tutorial, we will lead you through T-SQL window functions. At its end, you'll embrace this topic with ease and feel comfortable using window functions in SQL Server databases.

Window functions are so powerful that they serve as a dividing point in time: people talk about SQL Server before window functions and SQL Server after window functions. Because they were introduced into the standard relatively recently, these functions aren't covered in many T-SQL courses.

About the Window Functions in SQL Server Course
This course covers the syntax and semantics of T-SQL window functions. It shows how powerful they are, what the typical use cases are, and how to use ORDER BY and PARTITION BY to set up a frame for window functions. You'll also learn the difference between ROWS and RANGE clauses

This course is intended for intermediate users. We assume the user knows the basics of T-SQL, including:

  • How to select from a single table, including writing complex WHERE conditions
  • How to JOIN tables
  • How GROUP BY and HAVING work

What are the requirements?

  • A web browser
  • Knowledge of basic T-SQL, including JOINs and GROUP BY clauses

What Am I Going To Get from This SQL Server Course?

You'll discover how window functions can be used to:
  • Compute running totals and running averages
  • Build rankings
  • Find best and worst performers
  • Investigate trends across time
  • Calculate contributions to the whole, such as commission percentages

You'll also get a deeper understanding of T-SQL aggregate functions.

Who Should Take This Course?

  • Beginning database analysts
  • Developers who want to keep their knowledge of SQL Server current
  • Students taking classes in relational databases
  • Anyone who wants to learn SQL window functions

Table of contents


Paid content


Course progress


Exercises completed

1. Introduction

Window functions? We'll explain what they're all about


Exercises completed

2. The OVER() clause

Your first encounter with window functions


Exercises completed

10. Final quiz

Test all the skills you've acquired so far with this comprehensive final quiz


Exercises completed


Reviews (12)

Average rating

4.86 / 5


15 ratings


5 stars


4 stars


3 stars


2 stars


1 stars