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.
Get Using SQLite now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.