Window to Success: Mastering SQL Server Window Functions
2025TL; DR
In this session, we'll dive into the amazing world of window functions in SQL Server. We'll start with the basics, explaining what window functions are and why they're so powerful. Then we'll explore the different types of window functions - ranking, aggregate, and offset - and when to use each one.
Session Details
You’re a SQL Server DBA or developer. You’ve inherited a mess of undecipherable self-joins and temp tables with identity columns, and you have this dream that you could simplify it all - using a simple, elegant one-liner.
In this session, we'll dive into the amazing world of window functions in SQL Server. We'll start with the basics, explaining what window functions are and why they're so powerful. Then we'll explore the different types of window functions - ranking, aggregate, and offset - and when to use each one.
We'll cover practical examples on how window functions can simplify your queries, dramatically improve performance, and make your T-SQL code so much easier to read and maintain.
After this session, you'll be able to write more efficient queries, solve complex problems with a few lines of code, and your colleagues will throw glorious parties in celebration of your brilliance.
On a serious note, though, window functions are so much better than my ability to write abstracts - once you’ve tried them, you’ll never want to go back.
In this session, we'll dive into the amazing world of window functions in SQL Server. We'll start with the basics, explaining what window functions are and why they're so powerful. Then we'll explore the different types of window functions - ranking, aggregate, and offset - and when to use each one.
We'll cover practical examples on how window functions can simplify your queries, dramatically improve performance, and make your T-SQL code so much easier to read and maintain.
After this session, you'll be able to write more efficient queries, solve complex problems with a few lines of code, and your colleagues will throw glorious parties in celebration of your brilliance.
On a serious note, though, window functions are so much better than my ability to write abstracts - once you’ve tried them, you’ll never want to go back.
3 things you'll get out of this session
Understanding what window functions are.
Understanding how window functions optimize your code, and how they work with indexing.
Understanding slightly more advanced window function patterns, like gaps-and-islands.
Speakers
Daniel Hutmacher's other proposed sessions for 2026
20 years of productivity tips - a love letter to SSMS - 2026
Good dates, bad dates: Mastering your T-SQL date and time datatypes - 2026
JSON fundamentals for SQL pros - 2026
SQL Injection – The Old Dog of Data Security - 2026
SQL Noire – A Database Murder Mystery - 2026
T-SQL paging done right - 2026
Daniel Hutmacher's previous sessions
ACID in SQL Server: what it is, how it works, and how to live more adventurously.
A primer on ACID compliance in SQL Server, though mostly on Isolation and Durability, since those are the ones you have some control over. Presented at Data Saturday Gothenburg and Oslo 2023.
From substitutions to public keys - an introduction to cryptography
High-level introduction to cryptography.