Hi,
I have a boolean signal representing the on/off status of my heatpump compressor. What I want to achieve is a continuous aggregate which tells me how many times the compressor was on in a given time period. The way I tried was to use state_periods() with state_agg() and count the periods but since state_periods() returns a set, it cannot be used in a continuous aggregate. Is there a way to achieve this in a continuous aggregate or do I need to manually run my query and store the results in another hypertable?