Skip to main content

MAX

Returns the maximum value in the expression. Ignores all NULL values.

Syntax​

MAX ( [ DISTINCT ] expression  )  

Arguments​

expression
An expression that is a numeric, date/time, or literal.

DISTINCT Specifies that each unique value is considered. DISTINCT is not meaningful with MAX.

Return Type​

Returns a value same as expression.

Examples​

This example finds the highest (maximum) price in the pricing blockchain.

SELECT MIN(price) FROM pricing;

Response:

MAX(PRICE) [FLOAT32]    
530.44