The MAX function returns the largest value in the specified column or expression. The following SQL statement determines the project with the latest end date:

SELECT MAX(ACENDATE)
FROM DSN81010.PROJACT;

Points to remember

  • The result of the MAX function is of the same data type as the column or expression on which it operates.
  • The argument of the MAX function can be of any built-in data type other than CLOB, DBCLOB, BLOB, ROWID, or XML.

5 Top+features + of+ MongoDb (1 of 5)

Character string arguments can be no longer 255 bytes and graphic string arguments can be no longer than 127 bytes.
Best example for MAX salary:

SELECT MAX(SALARY)
FROM DSN81010.EMP
WHERE WORKDEPT = ‘D21’
AND SEX = ‘M’;