Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Functions : MAX


Returns the maximum value in a group of values.


COUNT ( {[ ALL ]expression}|{ DISTINCT column_ref}| * )


*Specifying DISTINCT has no effect on the result.
*The argument column_ref or expression can be of any type.
*The result of the function is of the same data type as that of the argument.
*The result is NULL if the result set is empty or contains only NULL values.


This example illustrates the MAX function:
SELECT order_date, product, MAX (qty)
FROM orders
GROUP BY order_date, product ;