DB2 graphic  QMF Version 8

MAX. -- Calculate the maximum value

The MAX. column function returns the greatest value in the group of numbers or characters in a specified column. You can apply MAX. to columns of any type.

If MAX. is applied to a CHAR or VARCHAR type column, alphanumeric ordering is used.

QMF ignores null values when searching for the maximum. If all values specified in a column are null, QMF returns no value.

You can use an example element with MAX. to select the maximum years of employment and maximum salary from the Q.STAFF table.

When you run this query:

Q.STAFF | YEARS | SALARY     |            |            |
--------+-------+------------|------------+------------|
        | _Y    | _S         | P. MAX. _Y | P. MAX. _S |

QMF produces this report:

MAX(YEARS)   MAX(SALARY)
----------   -----------
        13      22959.20

Rules for MAX.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004