Description
Especially with counter or boolean values it would be a benefit to be able to query the time between events.
Normally one would do something like:
SELECT sum(value) GROUP BY time(1h)
for example to see how dynamic certain events are. This will work well if a certain amount of events are recorded in the chosen time interval and if the events are relatively equally distributed over time.
In case only a small amount of events is given per time interval and even have nil in the chosen interval a calculation of the passed time between the intervals would be a lot more precise.
This would be especially useful in combination with the derivative function as it would allow to calculate the volatility of events like cache hits, attacks etc. In event everything that can be counted.
I would think about a query e.g.
SELECT time_between_events(ms) WHERE value > 1
to return a table of time in milliseconds that passed between each event that matches the WHERE clause.