Search⌘ K

Window Functions

Explore how window functions in T-SQL allow you to perform aggregate calculations without losing individual row details; this lesson helps you understand the use of the OVER() clause to add aggregate results as additional columns while keeping the full dataset visible.

Let’s consider the following table, ActionPoints, which tracks the points earned during a game.

In the table above, the column names are:

  • ActionId: A unique ID that is given to a performed game action.
  • Player: A player who performed the action.
  • Points: Points earned for the given action.

Limitations of aggregate functions

...