MySQL Forums
Forum List  »  General

Re: Downsampliing data, but define interval start time?
Posted by: Peter Brawley
Date: May 04, 2022 11:05AM

Your first interval starts on the computed starting hour, but your Where clause limits data to >= 00:30; The problem is just labelling, isn't it? In which case you can solve it with an outer query that relabels that first bin.

BTW wouldn't FLOOR( HOUR(datetime) / 2 ) more simply give you 2-hr periods you could then label as you please?



Edited 1 time(s). Last edit at 05/04/2022 11:56AM by Peter Brawley.

Options: ReplyQuote


Subject
Written By
Posted
Re: Downsampliing data, but define interval start time?
May 04, 2022 11:05AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.