Grouping statistics by periods #12716
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi there @devopg, We did have a tracking issue for adding support for This is already fixed in #11891, #11785 but note that those will be available in future releases. In the meantime as suggested here, you can use a temporal filter to create a view that has a sliding window of the last 24 hours of data and etc. this temporal filter will evolve continuously, and keep a finite amount of state, while elegantly sliding with time. We've also had a similar discussion regarding window functions like
Here is also another interesting read that you might find helpful for your usecase: https://materialize.com/slicing-up-temporal-aggregates-in-materialize/ Hope that this helps! |
Beta Was this translation helpful? Give feedback.
Hi there @devopg,
We did have a tracking issue for adding support for
LEAD()
andLAG()
here: https://github.com/MaterializeInc/materialize/issues/10601This is already fixed in #11891, #11785 but note that those will be available in future releases.
In the meantime as suggested here, you can use a temporal filter to create a view that has a sliding window of the last 24 hours of data and etc. this temporal filter will evolve continuously, and keep a finite amount of state, while elegantly sliding with time.
We've also had a similar discussion regarding window functions like
LAG()
andLEAD()
in our community Slack here: