- 类别:
AVG(系统数据指标函数)¶
返回表中指定列的平均值。
AVG 系统数据度量函数经过优化,可计算单个列的平均值,与调用 AVG 函数相比,它提供了更高的性能。
This topic provides the syntax for calling the function directly. To learn how to associate the function with a table or view so it runs at regular intervals, see 关联 DMF.
语法¶
实参¶
query指定一个 SQL 查询,该查询仅投射单个列。
允许的数据类型¶
query 投射的列必须具有以下数据类型之一:
FLOAT
NUMBER
返回¶
该函数会返回 NUMBER 值。
示例¶
测量表中 salary 列的平均值: