I have a data set of devices and the number of (un)instalmments of my app that are done daily.
A sample data would be:
time | device_name | daily_installs | daily_uninstall
t1 | device1 | 0 | 1
t1 | device2 | 2 | 0
t2 | device2 | 2 | 0
t2 | device3 | 12 | 0
I can group them by device_name and get the total of install that I have by month (or any other range) for example.
But the amount of device is huge, hence I would like to filter only the top 10.
How can I achieve that using InfluxDB?
The answer depends on which version of InfluxDB you're using.
Version 1.1-
Step 1
Select the monthly counts into a new measurement
Step 2
Select the top 10 results from the new measurement
Version 1.2+
In versions 1.2+ of InfluxDB you'll be able to do this in a single step using subqueries.