max

Returns the maximum value among a set of expressions, given either as a list or two expressions. Null values are ignored.

Category

Aggregation

Function syntax

max(<parameter>)

Parameters

  • listDuration
  • listInteger
  • listDecimal
  • listDateTime
  • listDateTimeOnly
  • listDateOnly
  • duration
  • integer
  • decimal
  • dateTime
  • dateTimeOnly

Signatures and returned types

max(<listDuration>)

Returns a duration.

max(<listInteger>)

Returns a duration.

max(<listDateTimeOnly>)

Returns a datetime without considering time zone.

max(<listDateTime>)

Returns a datetime.

max(<listDateOnly>)

Returns a date.

max(<listDecimal>)

Returns a decimal.

max(<decimal>,<decimal>)

Returns a decimal.

max(<duration>,<duration>)

Returns a duration.

max(<dateTime>,<dateTime>)

Returns a datetime.

max(<dateTimeOnly>,<dateTimeOnly>)

Returns a datetime without considering time zone.

max(<integer>,<integer>)

Returns an integer.

Examples

max(@{BarBeacon.inventory},5)

max([10,3,8])

Returns 10.

max([10,null,8])

Returns 10.

recommendation-more-help
4f4a00c1-77c9-4eee-84df-bbe6206c3ab9