Max Functions

Max Functions

Max Functions returns the maximum numeric value of expression encountered over a number of records as defined by a group by clause. Rank defaults to 1 which corresponds to the highest value. By specifying rank as 2 the second highest value will be returned. If rank is 3 the third highest value will be returned and so on.

Example1:

Max Functions Grouping

Example2:

Max Functions Grouping