T-SQL Window Functions

Learn to use the versatile T-SQL functions called "window functions" to solve complex queries.
Course info
Rating
(225)
Level
Intermediate
Updated
Jul 8, 2015
Duration
2h 31m
Table of contents
Getting Started
Understanding the OVER Clause
Using Ranking Functions
Using Window Aggregate Functions
Understanding Framing
Using Accumulating Window Aggregates
Retrieving Data from Other Rows
Using Statistical Functions
Description
Course info
Rating
(225)
Level
Intermediate
Updated
Jul 8, 2015
Duration
2h 31m
Description

With the 2005 and 2012 releases of SQL Server, Microsoft gave us several new functions with amazing capabilities. These functions are part of the ANSI standards, and have nothing to do with the Windows OS. Some of these functions are well known, for example ROW_NUMBER is used by many people. In addition to ROW_NUMBER, we now have the ability to calculate summaries without changing a query to an aggregate query, calculate running totals, pull values from other rows, and perform statistical calculations. This course covers all of the available window functions including syntax, real world examples, and performance considerations.

Course FAQ
Course FAQ
What is T-SQL?

T-SQL (Transact-SQL) is a programming extenstion to SQL that adds several other features for interacting with relational databases, such as exception and error handling, transaction control, row processing, and much more.

What are T-SQL window functions?

Window functions perform calculations over a set of rows and return a value for each row based on the query. A "window" is simply a set of rows that the function operates on, and the window function uses the values in the window to determine the returned value.

What will I learn in this course?

In this course you will learn how to use T-SQL window functions to solve queries. Some of the topics covered include:

  • An introduction to window functions
  • Tools to measure performance
  • Understanding the OVER clause
  • Using ranking functions
  • Window aggregate functions
  • Framing
  • Accumulating window aggregates
  • FIRST_VALUE and LAST_VALUE
  • Statistical functions
Who is this course for?

This course is designed for anyone who wants to learn T-SQL window functions in order to more effectively solve complex database queries.

Are there prerequisites to this course?

This is an intermediate level course, so it does assume a fundamental understanding of SQL and T-SQL. But as far as window functions themselves, no prior experience is expected.

About the author
About the author

Kathi Kellenberger is a SQL Server MVP and a Teammate with Linchpin People. She is the author or co-author of several SQL Server books, including Beginning T-SQL from Apress, and frequently speaks at community events such as PASS Summit and SQL Saturday.

More from the author
Improve SQL Server Performance with Compression
Intermediate
1h 37m
Aug 11, 2017
Build and Deploy SSRS Mobile Reports
Intermediate
2h 45m
Jan 28, 2017
Configuring Kerberos for SSRS
Beginner
1h 39m
Jan 26, 2016