Skip to main content
Since 1.16.0 This returns the largest values seen by the aggregate and the corresponding values associated with them. Note that Postgres requires an input argument with type matching the associated value in order to determine the response type.

Samples

Find the top 5 values from i * 13 % 10007 for i = 1 to 10000:
Output:

Arguments

The syntax is:

Returns