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.

Arguments

NameTypeDefaultRequiredDescription
aggMaxNBy-The aggregate to return the results from. Note that the exact type here varies based on the type of data stored.
dummyANYELEMENT-This is purely to inform Postgres of the response type. A NULL cast to the appropriate type is typical.

Returns

The largest values and associated data seen while creating this aggregate.