MIN. -- Calculate the minimum value
The MIN. column function returns the smallest value in the group of
numbers or characters in a specified column. You can apply MIN. to columns of any type.
If MIN. is applied to a CHAR or VARCHAR type column, alphanumeric
ordering is used.
- The number 9 is greater than 8, and so on, to 0 (zero).
- Zero is greater than the uppercase Z, which is greater than
Y, and so on, to A.
- A is greater than the lowercase z, which is greater than y,
and so on, to a.
- Lowercase a is greater than the special characters.
QMF ignores null values when searching for the minimum. If all
values specified in a column are null, QMF returns no value.
You can use an example element with MIN. to select the minimum
years of employment for employees in the Q.STAFF table.
When you run this query:
Q.STAFF | NAME | DEPT | YEARS | |
--------+---------+------+-------+------------|
| | | _Y | P. MIN. _Y |
QMF produces this report:
MIN(YEARS)
----------
1
Rules for MIN.
- You can follow MIN. with an example element or an arithmetic expression that
contains at least one example element.
- In an unnamed column, specify MIN. with the example element that identifies the column from
which the smallest value is to be retrieved. This example element
also appears in the column that contains the value to retrieve.
- When you apply MIN. to a column named in an example table, you must apply a column
function (AVG., SUM., MIN., MAX., COUNT.), or the G. (group) operator to every other column to select.
