The min()
aggregate returns the smallest non-NULL
. This is typically used to find the smallest numeric
value, but the aggregate will sort through all types of data.
Numeric types (mixed integers and floating-point) are considered
smallest, and will be sorted together in their natural order.
These are followed by text values, which are followed by BLOB
values.value
If no non-NULL
is found, value
min()
will return a NULL.
There is also a scalar version of min()
which takes two or more
parameters.