The MAX function calculates the largest of the values specified by the value expression in its argument. If there are no values in the result table to which the MAX function is applied, it returns a null value. The MAX function returns a value of the same data type as the value in its argument for all data types except LIST OF BYTE VARYING.