January 14th, 2009

AVG (Average)

Posted by admin in J. Column Functions

The AVG function returns the average, or arithmetic mean, of a collection of numbers.
The arithmetic mean is the sum of the values divided by the number of quantities.
The expression is a column name, numeric expression, or literal that only involves numeric values or nulls. Null values are removed.
The average of no rows is NULL, not zero.
DISTINCT will remove duplicate values.
The result is only as precise as the data types used in the expression.

                                                   AVG(expression)

                                                             or

                                         AVG(DISTINCT column-name)

Leave a reply

:mrgreen: :neutral: :twisted: :shock: :smile: :???: :cool: :evil: :grin: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: