diff --git a/docs/source/user-guide/sql/scalar_functions.md b/docs/source/user-guide/sql/scalar_functions.md index 636a33100ed0..05da3c856613 100644 --- a/docs/source/user-guide/sql/scalar_functions.md +++ b/docs/source/user-guide/sql/scalar_functions.md @@ -642,6 +642,26 @@ nvl2(expression1, expression2, expression3) _Alias of [nvl](#nvl)._ +## Comparison Functions + +- [greatest](#greatest) + +### `greatest` + +Returns the greatest value in a list of expressions. +Returns _null_ if all expressions are _null_. + +``` +greatest(expression1[, ..., expression_n]) +``` + +#### Arguments + +- **expression1, expression_n**: + Expressions to compare and return the greatest value. + Can be a constant, column, or function, and any combination of arithmetic operators. + Pass as many expression arguments as necessary. + ## String Functions - [ascii](#ascii)