Scalar. Returns the average value of multiple expressions, ignoring NULL parameters.
avgof ( expression, [,...] )
expression |
There must be at least one argument, and all the arguments must be of the same datatype. |
If all parameters are NULL, the function returns NULL. The function accepts the following datatypes: float, integer, long, interval, money types, and date/time types.
The function returns the same datatype as its argument, however, if the expressions are numeric types (integers, floats, or longs), the function returns a float.
avgof ( 1, 2, NULL, 3, NULL ) returns 2.0.