avg()(聚合函数)avg() (aggregation function)

计算整组中 Expr 的平均值。Calculates the average of Expr across the group.

  • 只能在 summarize 内的聚合上下文中使用Can only be used in context of aggregation inside summarize

语法Syntax

summarize avg(Expr)summarize avg(Expr)

参数Arguments

  • Expr:用于聚合计算的表达式。Expr: Expression that will be used for aggregation calculation. 具有 null 值的记录会被忽略,并且不会包含在计算中。Records with null values are ignored and not included in the calculation.

返回Returns

整组中 Expr 的平均值。The average value of Expr across the group.