The MAX column function returns the maximum value in a set of values in a group.
The MAX scalar function returns the maximum value in a set of values. There must be two or more arguments, and the arguments must be compatible. The arguments cannot be DataLink values.
Example column:
Using the EMPLOYEE table, return MAX_SALARY of the maximum monthly salary (SALARY / 12) value.
SELECT MAX(SALARY) /12 FROM EMPLOYEE
Results in 4395.83 when using the sample table.
Example scalar:
Assume column M1 has a value of 5.5, column M2 has a value of 4.5, and column M3 has a value of 6.25.
MAX(M1,M2,M3)
Returns the value 6.25.