AVG()
Average
Depends on the input type
AVG ([ALL | DISTINCT] <expr>)
Parameter | Description |
---|---|
expr |
Expression.It may contain a table column, a constant, a variable, an expression, a non-aggregate function or a UDF that returns a numeric data type.Aggregate functions are not allowed as expressions |
AVG
returns the average argument value in the group.NULL
is ignored.
Parameter ALL
(the default) applies the aggregate function to all values.
Parameter DISTINCT
directs the AVG
function to consider only one instance of each unique value, no matter how many times this value occurs.
If the set of retrieved records is empty or contains only NULL
, the result will be NULL
.
The result type of AVG
depends on the input type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|