Created
September 26, 2021 08:50
-
-
Save ajeetraina/c78f1c79e126204ad9396d861f328327 to your computer and use it in GitHub Desktop.
Stats from a five minute window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
now(), -- UTC | |
count(1)/300 as eps -- averaged over prev 300s | |
from statistics.events | |
where approx_event_time > now() - interval'5 minute'; | |
now | eps | |
-------------------------------+------ | |
2021-05-14 05:06:28.974982+00 | 1646 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment