Maximum

Syntax

MAX(…expr1…, …expr2…, …)

Typing

t1, t2, … -> largest(t1, t2, …)

Description

Return the maximum value of all the operands.

All operands must have compatible types (ie. it is possible to convert one into another).

The result will be NULL if any of the operands is.

Examples

expression evaluates to
MAX(1, 2, 3) 3
MAX("foo", "bar") "foo"
MAX([5; 6], [3; 9]) [5; 6]

See Also

Maximum (aggregate) Minimum