TimescaleDB grouping statistics by periods

Viewed 50

I’m a newbie in TimescaleDB. I am inspired by this software and I’m going to learn all the documentation, but the number of unusual functions makes even my eyes run away

I need to make statistics on periods (day|week|month|year) for example like this (but not the percentages , but the values):

enter image description here

What is the optimal query I should make ?

I’ve been thinking about JOIN the table to myself 4 times and using bucket , but it looks scary

1 Answers
Related