1

Hy in my DB i have data that occurs every 10 min (timestamp) and i would like to get only those that have timestamp that is equal to full hours between one timeframe

for example only those that have timestamp time equal 09.00, 10.00, 11.00, 12.00, 13.00

1 Answers1

3

Extract the minute portion of the timestamp with DATE_PART_STR(mydate, 'minute') then compare it to zero.

Chris Maurer
  • 2,339
  • 1
  • 9
  • 8
  • CRATE INDEX ix1 ON mybucket(DATE_PART_STR(mydate, 'minute')); SELECT d.* FROM mybucket AS d WHERE DATE_PART_STR(mydate, 'minute') = 0; – vsr Dec 21 '22 at 17:53