SORTLAST(value_exp)

Returns the Last Item in the Sorted Population of value_exp.

Description

This function returns the nth value of the sorted population of n elements.

 

Example:

V1

V2

V3

V4

V5

V6

5

25

30

25

25

2

The above example would return 30, because it is the 6th value in the sorted population.

 

Parameters

value_exp can be an expression of any SQL data type.