I am actually using Version 8.2.1
I have a collection of data from which I visualize the power consumption. For days, weeks, months and years. Now I would like to split this data once again. Namely for two day ranges from 6am to 6pm and from 6pm to 6am. That’s 12 hours each. Here is my code for querying the past year grouped into 6 hours.
SELECT non_negative_difference(last("value")) FROM "stromzaehler" WHERE ("measurement" = 'KW/h') AND time >= 1609455600000ms and time <= 1640991599999ms GROUP BY time(6h) tz('CET')
Does anyone have an idea how I can best realize this?