I have produced a table like this:
+----------+---------+---------+-------+
| _time | field_1 | field_2 | count |
+----------+---------+---------+-------+
| 08:00:00 | A | 1 | 2 |
+----------+---------+---------+-------+
| 08:00:00 | B | 1 | 4 |
+----------+---------+---------+-------+
| 08:00:03 | B | 3 | 1 |
+----------+---------+---------+-------+
| 08:00:03 | A | 2 | 3 |
+----------+---------+---------+-------+
I want to know:
what's average & maximum count, per (field_1+field_2) combination, per second.
The problem is the _time is missing some seconds, so the stats count
result only give me the aggregated results on existing time buckets.
How can I expand this table to include every missing time seconds, just by filling count=0, for each (field_1+field_2) combination? As long as I can do this, I can get the result simply by stats avg(count) max(count) by field_1 field_2
.