Abstract:
No, they don’t have anything to do with the operating system by the same name. Instead, window functions allow us to calculate a single value based on a set of rows, and we have extraordinary control over which rows get used as the inputs. We’ll start by covering what a window function is and will discuss the syntax and usage of the OVER clause in detail. We will also cover the three classes of window functions (ranking, aggregate and analytic) with focus on some commonly used functions as well some “gotchas” with some of these functions. The focus of this session will be on SQL Server, but many other RDBMS vendors implement these functions as well. You will learn how this class of functions can help you write more performant code.
Level: Beginner
Presentation History:
- SQL Saturday 961 (Albany, New York), 25 July 2020
- SQL Saturday 991 (Iowa City, Iowa), 1 August 2020
- SQL Saturday 1054 (St. Paul, Minnesota), 30 September 2023
- Data Saturday 38 (Phoenix, Arizona), 23 Mar 2024