The MAX function retrieves the maximum value of the specified expression. The character strings are compared in dictionary order. The maximum value is the one closest to the last entry in the dictionary. For other data types, the maximum value is the largest value. The MAX function cannot be used for attributes that include collections or object domains (user-defined classes or multimedia classes).
MAX ( [ DISTINCT | UNIQUE | ALL ] expression )
With expression for the MAX function, you can specify a single-value expression.
The following is an example of returning the maximum number of gold medals that Korea won in the past Olympic Games.
WHERE nation_code = 'KOR';
Result : 12