There are some functions in Q/KDB that let us aggregate on a sliding window (msum, mavg, etc.). But these functions takes the number of previous rows into account.
I'd like a function that would aggregate on a sliding window but with time instead of number of rows. For example on the last 5 minutes.
Do such functions exist? If not, how can I design it? I don't want to use a while loop, as it will slow down my program too much because of the huge amount of data.
Thank you for your help