Name

min() — Return the smallest value

Common Usage

min( value )

Description

The min() aggregate returns the smallest non-NULL value . 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.

If no non-NULL value is found, min() will return a NULL.

There is also a scalar version of min() which takes two or more parameters.

See Also

max(), min()