Aggregate. Returns the maximum non-NULL value of a group of values.
max (expression)
expression |
An expression that will typically reference one or more columns in the input stream. It will be evaluated using an arbitrary member of the group. |
The returned value is based on the datatype of the input to be counted logically. If all values are NULL, the function returns NULL.
The max function can be used to assess portfolios and identify the top stocks in a group of values.