Using Multi-Argument MIN, MAX Functions in the WHERE Clause

When the functions MIN() and MAX() are used in a WHERE clause, the multi-argument forms of these functions must be used.

In a WHERE clause, the following functions do not perform aggregation as they would if they were used in a select list:
  • MAX(x, y, …): The multi-argument MAX function returns the argument with the maximum value.
  • MIN(x, y, …): The multi-argument MIN function returns the argument with the minimum value.