MIN |
![]() ![]() ![]() |
The MIN field qualifier keyword causes a field to be reported together with its minimum value.
Format
MIN field {field.qualifiers} {NO.NULLS}
where
The MIN field qualifier keyword is placed before the field name to which it applies and causes the query processor to report the value of the field for each record processed and also to report the minimum value at the end of the report. Used with breakpoints, the MIN keyword will also report the minimum value of the field at each breakpoint.
If the field is defined as multi-valued, the MIN keyword operates on each value in turn.
The MIN keyword operates on all types of data. Where the field holds non-numeric data, a string comparison is performed.
The NO.NULLS keyword can be used to prevent null values being included in the test for the minimum value.
Used with the SHOW verb, the MIN keyword specifies the minimum number of records allowed in the resultant select list.
Example
The command
LIST INVOICES MIN VALUE CUSTOMER.NAME WITH NO AMT.PAID
would produce a display such as that below in which the minimum value of the VALUE field is repeated at the end of the report.
LIST INVOICES MIN VALUE CUSTOMER.NAME WITH NO AMT.PAID Invoice ...Value Customer................... 74529 £1712.43 J McTavish 74273 £95.23 County Newspapers 63940 £141.00 R Bryant 74993 £9.29 Write Right Stationery ======== £9.29 4 records listed. |