MIN

Function MIN is also found in the following categories: Window functions.

Syntax

MIN( value )
MIN( value
     [ FIXED ... | INCLUDE ... | EXCLUDE ... ]
     [ BEFORE FILTER BY ... ]
   )

More info:

Description

Returns the minimum value.

If value:

  • number — Returns the smallest number.
  • date — Returns the earliest date.
  • string — Returns the first value in the alphabetic order.

Argument types:

  • valueBoolean | Date | Datetime | Fractional number | Integer | String | UUID

Return type: Same type as (value)

Example

MIN([Profit])

Data source support

ClickHouse 19.13, Microsoft SQL Server 2017 (14.0), MySQL 5.6, PostgreSQL 9.3.

Previous