How to get mode of column values where column is either true or false (boolean) ?
from(bucket: "monitor")
|> range(start: 0)
|> filter(
fn: (r) =>
r._measurement == "weather_status" and r._field == "is_good"
and
r.location_id == "69",
)
|> aggregateWindow(every: 1h, fn: mode, column: "_value")
Current query is returning null at some time points.
I tried giving createEmpty: false inside aggregateWindow. But it is not completely useful. I have observed that if every record in a 1h interval is either true or false, it is returning as null.