Versions:

Time-weighted average functions

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 typeHyperfunction nameToolkitExperimental
time_weight() functions
Aggregatetime_weight()
Accessoraverage()
first_time(), last_time()
first_val(), last_val()
integral()
interpolated_average()
interpolated_integral()
Rolluprollup()

Found an issue on this page?

Report an issue!

Keywords

Related Content