Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt

Use this file to discover all available pages before exploring further.

The GREATEST function selects the largest value from a list of any number of expressions. The expressions must all be convertible to a common data type, which will be the type of the result. NULL values in the argument list are ignored. The result will be NULL only if all the expressions evaluate to NULL.

Syntax

GREATEST(<expression> [,...])

Parameters

ParameterDescriptionSupported input types
<expression>The expression(s) to select greatest value.Any

Return Types

Same as input type

Example

SELECT GREATEST(NULL, 2^3, 3^2)
Returns: 9