Versions:

# Time-weighted average functions ToolkitTimescaleDB Toolkit functions are available under Timescale Community Edition. They are automatically included with Timescale Cloud. Click to learn more.

Toolkit

TimescaleDB Toolkit functions are available under Timescale Community Edition. They are automatically included with Timescale Cloud. Click to learn more.

This section contains functions related to time-weighted averages and integrals. Time weighted averages and integrals are commonly used in cases where a time series is not evenly sampled, so a traditional average gives misleading results. For more information about these functions, see the hyperfunctions documentation.

Some hyperfunctions are included in the default TimescaleDB product. For additional hyperfunctions, you need to install the Timescale Toolkit PostgreSQL extension.

### Time weighted averages functions

Hyperfunction type | Hyperfunction name | Toolkit | Experimental | |
---|---|---|---|---|

time_weight() functions | ||||

Aggregate | `time_weight()` | ✅ | ||

Accessor | `average()` | ✅ | ||

`first_time()` , `last_time()` | ✅ | |||

`first_val()` , `last_val()` | ✅ | |||

`integral()` | ✅ | ✅ | ||

`interpolated_average()` | ✅ | ✅ | ||

`interpolated_integral()` | ✅ | ✅ | ||

Rollup | `rollup()` | ✅ |

Found an issue on this page?

Report an issue!Keywords