MAX is an aggregate function that evaluates the maximum of the
-expression over a set of values (see

MAX is an aggregate function that evaluates the maximum of an
+expression over a set of rows (see

The
-DISTINCT qualifier eliminates duplicates. The ALL qualifier retains duplicates.
-These qualifiers have no effect in a MAX expression. Only one DISTINCT aggregate
+DISTINCT and ALL qualifiers eliminate or retain duplicates, but
+these qualifiers have no effect in a MAX expression. Only one DISTINCT aggregate
expression per * SelectExpression* is
allowed. For example, the following query is not allowed:

The *Expression* can contain multiple
@@ -38,12 +38,13 @@
or subquery. It must evaluate to a built-in data type. You can therefore call
methods that evaluate to built-in data types. (For example, a method that
returns a *java.lang.Integer* or *int* evaluates to an INTEGER.)
-If an expression evaluates to NULL, the aggregate skips that value.

For
-CHAR, VARCHAR, and

The type's comparison rules determine the maximum value. For +CHAR and VARCHAR, the number of blank spaces at the end of the value can affect how MAX is evaluated. For example, if the values 'z' and 'z ' are both stored in a column, you cannot -control which one will be returned as the maximum, because a blank space has -no value.

The resulting data type is the same as the expression on +control which one will be returned as the maximum, because blank spaces are +ignored for character comparisons.

The resulting data type is the same as the expression on which it operates (it will never overflow).

MIN is an aggregate expression that evaluates the minimum of +

MIN is an aggregate function that evaluates the minimum of
an expression over a set of rows (see

The expression can contain multiple column +FROM Flights

The *Expression* can contain multiple column
references or expressions, but it cannot contain another aggregate or subquery.
It must evaluate to a built-in data type. You can therefore call methods that
evaluate to built-in data types. (For example, a method that returns a *java.lang.Integer* or *int* evaluates
to an INTEGER.) If an expression evaluates to NULL, the aggregate skips that
-value.

The type's comparison rules determine the maximum value. For
-CHAR, VARCHAR, and

The +value.

The type's comparison rules determine the minimum value. For +CHAR and VARCHAR, +the number of blank spaces at the end of the value can affect how MIN is evaluated. +For example, if the values 'z' and 'z ' are both stored in a column, you cannot +control which one will be returned as the minimum, because blank spaces are +ignored for character comparisons.

The resulting data type is the same as the expression on which it operates (it will never overflow).