SQL FunctionsConditional FunctionsGREATESTOn this pageGREATESTReturns the maximum value from a set of values. Syntax GREATEST(<value1>, <value2> ...) Examples SELECT GREATEST(5, 9, 4);┌───────────────────┐│ greatest(5, 9, 4) │├───────────────────┤│ 9 │└───────────────────┘