Seddryck / Tseesecake

Tseesecake is a lightweight proxy for time-series query engines, supporting multiple database engines and storage providers, with a SQL dialect dedicated to time series
https://seddryck.github.io/Tseesecake
Apache License 2.0
2 stars 1 forks source link

Aggregation "product" #67

Closed Seddryck closed 9 months ago

Seddryck commented 11 months ago

It should be possible to define an aggregation product similar to sum but executing the product of all values.

select product(Forecasted) from WindEnergy

The PRODUCT aggregation is not a standard aggregation in ANSI SQL and is not available in Microsoft SQL Server.

Generally speaking, it could be implemented as the exponential of the sum of logarithms, but we need to take of the fact that 0 is producing 0.

It's a good use case to check how to apply templates in dictionaries