Skip to main content
Returns the minimum value in its argument. NULL values are ignored. If all inputs are NULL, MIN returns NULL.

Syntax

Parameters

Return Types

Same as input type

Examples

The tournaments table contains the following data:

Rows: 5Execution time: 6.00ms

The following example finds the smallest prize amount in the tournaments table:

Rows: 1Execution time: 5.74ms

MIN also works on text columns, returning the lexicographically smallest value. The following example finds the tournament name that comes first alphabetically:

Rows: 1Execution time: 6.22ms