GREATEST

Learn how to use the GREATEST conditional function in PlaidCloud Lakehouse. Returns the maximum value from a set of values. Includes syntax and examples.

Returns the maximum value from a set of values.

Analyze Syntax

func.greatest(<value1>, <value2> ...)

Analyze Examples

func.greatest((5, 9, 4))

┌──────────────────────────┐
 func.greatest((5, 9, 4)) 
├──────────────────────────┤
                        9 
└──────────────────────────┘

SQL Syntax

GREATEST(<value1>, <value2> ...)

SQL Examples

SELECT GREATEST(5, 9, 4);

┌───────────────────┐
 greatest(5, 9, 4) 
├───────────────────┤
                 9 
└───────────────────┘