Skip to main content
Since 1.16.0 This returns the smallest 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 bottom 5 values from i * 13 % 10007 for i = 1 to 10000, and the integer result of the operation that generated that modulus.
Output:

Arguments

The syntax is:

Returns