MAX()

Scalar. Returns the maximum value from a list of expressions.

Syntax

MAX( expression, expression [, ...] )
Data Types

Return

expression

Integer

Integer

Long

Long

Float

Float

Interval

Interval

Timestamp

Timestamp

String

String

BLOB

BLOB

Usage

If any parameter is NULL, the function returns NULL.

Example

The following example calculates the maximum value of three columns in the stream Orders:

INSERT INTO OutStream
SELECT MAX(Orders.line1price, Orders.line2price, Orders.line3Price)
FROM Orders;