Data Geeks Hub
    Window Functions
  • Window functions are powerful tool that allows you to perform calculations across a set of rows that are somehow related to the current row.
  • Like group by it doesn’t collapse the result into a single row
  • They are particularly useful for tasks such as ranking, calculating running totals, moving averages, and more.

 

Types of Window Functions
  • Ranking – These functions assign ranks, percentages, or tiles to the rows based on the position in sorted order within a partition.

 

  • Analytics/ Value – These functions allow you to access specific rows or compute values related to the current row within a partition.

 

  • Aggregate – These functions perform cumulative or aggregate calculations over a partition.