How do I find the average of values over time?

If you want to find the average of an existing numeric value in your data, you can simply use timechart and avg.

Finding the average of a computed value like the count of records is more complicated, because timechart cannot nest aggregate functions. To solve this problem, we need two timechart statements:

The make_event aids performance by aggregating data to interval start times.