integral divided by the elapsed time. Note that there is a
key difference to avg(): If there is exactly one value, avg() would return that value, but average() returns
NULL.
Arguments
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| tws | TimeWeightSummary | - | ✔ | The input TimeWeightSummary from a time_weight() call |
Returns
| Column | Type | Description |
|---|---|---|
| average | DOUBLE PRECISION | The time-weighted average |
Samples
Calculate the time-weighted average of the columnval, using the ‘last observation carried forward’ interpolation
method: