Categories
SQL

Anatomy of a Window Function Execution Plan

After last week’s post I got to thinking that although we’ve looked at how to implement window functions, we haven’t peeked under the hood to see how they are executed. Then what do you know, Kevin has picked up my post to provide an alternative approach. He observed that whilst his approach was more straightforward it produced a more […]

Categories
SQL

Mixing Grouping and Window Functions

We revisited window functions last week for T-SQL Tuesday. As we’re in that area there’s another example I thought was worth exploring. Can we group data whilst applying window functions in the same query? The problem For our example we’ll use the same sample data as last week. This contains sales values broken down by period, also […]