max#

Description#

Returns the maximum value of a group of inputs.

Given one argument column, max computes the maximum of that column across a group of rows.

Given multiple columns, maxcomputes the scalar greatest value of those columns across a group of rows. In this case, max evaluates to null if any of the arugments evaluate to null.

Return type#

least common generalization

Domain#

This is an aggregate function (aggregates rows over a group in aggregate verbs.)

This is a window function (calculates over a group of multiple input rows using windowing.)

Categories#

Usage#

max(expression_1, expression_2, ...)

Argument

Type

Optional

Repeatable

Restrictions

expression

comparable

no

yes

none