Thx for the reply. Appreciate the time taken.
Database is the plan B. Though for just a few values (60 & 24) in memory would do (and would be fast).
Also found this: https://flows.nodered.org/node/node-red-contrib-aggregator
Seem to do the trick
This ode you pointed seems to do something very similar to the standard palette smooth node, I don’t know what is the difference.
If you wanted to make something really easy you can do it with a simple counter and reset every hour or at a specific time, (maybe having various running) however this will give you the messages since a specific time, for instance since 00:00 or since 13:00 or whatever, not exactly latest 60 minutes.