The AVG function calculates the average of the values specified
by the value expression in its argument. If there are no rows in
the result table to which the AVG function is applied, it returns
a null value.
The AVG function must refer to a value with a numeric or INTERVAL
data type. The value it returns is a floating-point data type for
numeric expressions, or an INTERVAL data type.
If a value is NULL, the row is treated as missing and, if your
dialect is set to an ANSI/ISO SQL standard, a warning message is
returned.