Postgresql filtering by value over rolling time period
0
votes
1
answer
201
views
I am newbie to postgresql and still getting my head around. I have used windows function etc. till date and yes I can make some sense.
I have got the following data set:
I need to find those customers whose amount > 2 for 4 minutes in a rolling fashion, considering the data for a day. By that I mean in the given data set, customer 1 is one such as it has got amount > 2 at 16:01,16:02,16:03,16:04 and then at 16:02,16:03,16:04, 16:05. If there is any such single occurrence, the customer needs to be selected. Customer 2 doesn't have so. Wondering what's the best approach to do this?
Any help will be much appreciated.
Regards,

Asked by app_developer
(1 rep)
Dec 17, 2018, 09:39 AM
Last activity: Jun 21, 2025, 05:09 PM
Last activity: Jun 21, 2025, 05:09 PM