ES|QL MV_AVG function
number-
Multivalue expression.
Converts a multivalued field into a single valued field containing the average of all of the values.
| number | result |
|---|---|
| double | double |
| integer | double |
| long | double |
| unsigned_long | double |
ROW a=[3, 5, 1, 6]
| EVAL avg_a = MV_AVG(a)
| a:integer | avg_a:double |
|---|---|
| [3, 5, 1, 6] | 3.75 |