What is a window function?hard

Type
conceptual
Topic
window-function
Frequency
common
Tags
window, function
Answer

It calculates across related rows without collapsing them.

Explanation

Window functions use OVER with optional PARTITION BY and ORDER BY for rankings, running totals, moving averages, and row comparisons.

Follow-upWhat is the difference between RANK and ROW_NUMBER?