Max()
Finds the largest value from the specified list of values. This function takes one or more integer, number, or string values as arguments and returns an integer, number, or string value, depending on which value is the largest. When comparing string values, each character is interpreted as its equivalent numeric ASCII value. For example, the character "A" has the value 65, and "b" has the value 98. The larger the numeric value of a character is, the larger it is interpreted to be. So in the previous example, "b" is considered to be larger than "A".
Syntax
Max(<first_value>, <second_value> ... <last_value>)
Additional arguments must be separated with commas.
Input
first_value
integer, number, string, null
The first value to test.
second_value
integer, number, string, null
(Optional) The second value to test.
last_value
integer, number, string, null
(Optional) The last value to test.
Output
integer, number, string
Examples
- The expression Max(3, 5, 1) returns
5
. - The expression
Max(3.0, 5.0, 1.0)
returns5.0
. - The expression
Max("a", "B", "c")
returns"c"
.