MAX

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

Syntax

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

More info:

Description

Returns the maximum value.

If value:

  • number — Returns the largest number.
  • date — Returns the latest date.
  • string — Returns the last value in the alphabetic order.

Argument types:

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

Return type: Same type as (value)

Example

MAX([Profit])

Data source support

ClickHouse 21.8, Microsoft SQL Server 2017 (14.0), MySQL 5.7, Oracle Database 12c (12.1), PostgreSQL 9.3, YDB.

Previous
Next