mean
The mean: Float64 for Int64 and Float64, Decimal128(38, max(s, 6)) for decimals.
Flags
| Flag | Value |
|---|---|
| Kind | aggregate |
| Nulls | nulls are skipped |
| Deterministic | yes |
| Order matters | no |
| Decomposable | yes, by sum and count |
Example
A pipeline from the language's tested corpus that uses mean, over the example tables.
from orders
aggregate {n = count_all(), rows = count_all(), total = sum(amount), avg = mean(amount)}In a plan:
{
"args": [
{
"col": 2
}
],
"fn": "mean"
}