avg avg

傳回一組運算式中的平均值(以清單或兩個運算式形式提供)。 會忽略Null值。

類別

彙總

函式語法

avg(<parameter>)

參數

支援的型別:

  • listInteger
  • listDecimal
  • 小數
  • 整數

簽章與傳回型別

avg(<listInteger>)

avg(<listDecimal>)

avg(<decimal>,<decimal>)

avg(<decimal>,<integer>)

avg(<integer>,<decimal>)

avg(<integer>,<integer>)

傳回小數。

範例

avg(@event{BarBeacon.inventory},5)

avg([10,3,8])

傳回7.0。

avg(10.2, 3)

傳回6.6。

recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76