MAX and MIN: Finding the Maximum or Minimum Value

How to:

The MAX and MIN functions return the maximum or minimum value, respectively, from a list of values.


Top of page

x
Syntax: How to Find the Maximum or Minimum Value
{MAX|MIN}(value1, value2, ...)

where:

MAX

Returns the maximum value.

MIN

Returns the minimum value.

value1, value2

Numeric

Are the values for which the maximum or minimum value is returned, the name of a field that contains the values, or an expression that returns the values. If you supply an expression, use parentheses as needed to ensure the correct order of evaluation.

Note: MAX and MIN do not use an output_format. The format of the result is floating-point double precision.



Example: Determining the Minimum Value

MIN returns either the value of ED_HRS or the constant 30, whichever is lower.

MIN(ED_HRS, 30)

For 45.00, the result is 30.00.

For 25.00, the result is 25.00.


iWay Software