Name
max() — Return the largest value
Common Usage
max( value )Description
The max() aggregate returns the largest non-NULL
. This is typically used to find the largest numeric
value, but the aggregate will sort through all types of data.
BLOB values are considered to have the largest value, followed
by text values. These are followed by the numeric types (mixed
integer values and floating-point values) that are sorted
together in their natural order.value
If no non-NULL
is found, value
max()
will return a NULL.
There is also a scalar version of max() which takes two or more
parameters.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access