MIN

functionsupportedCore SQL functions

docs.snowflake.com ↗

Data metric functionsAggregate functionsWindow functions

Returns the minimum value for the records within expr. NULL values are ignored unless all the records are NULL, in which case a NULL value is returned. See also: COUNT , SUM , MAX

Syntax

supportedpartialnot supportednot scored

Aggregate function

MIN( <expr> )

Window function

MIN( <expr> ) [ OVER ( [ PARTITION BY <expr1> ] [ ORDER BY <expr2> [ { ASC | DESC } ] [ NULLS { FIRST | LAST } ] [ <window_frame> ] ] ) ]

Returns

The data type of the returned value is the same as the data type of the input values.

Usage notes

Collation Details

- The comparisons follow the collation based on the input arguments’ collations and precedences. - The collation of the result is the same as the collation of the input.

Referenced by