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()

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.