Saturday 20 July 2024

Difference between the Aggregate function and window aggregate function

 

Below are the difference

Normal Aggregate function

Windows  Aggregate function

Calculate based on a set of row and return a single value for the entire collection.

Calculate based on the set of row and return value for each row in the set.

Can group rows using the group by  clause

Can partition row using the partition by clause

Sum, Agg, count are the same example of aggregate function.

Rank, dense_rank , Row_number ,leg, lead these are some example of windows functions.

No comments:

Post a Comment

If you have any doubt, please let me know.

Popular Posts