I have influx DB (time based) where I am trying to retrieve the data for 1 hour. I need to check how many Users logged in system for how many times in each hour by taking value as column.
Data has 3 columns- Time, user, and value
user is logging in at different time. so I am trying to aggregate the value of each user and want to take out top 3 user which has maximum value…
Hello @kanwalgujral,
Can you please share what you’re getting and what you expect?
I’m having a little bit of trouble understanding.
What do you mean by take out? Remove the top 3 from your result or only include top 3?
Thankyou for getting back…
Actually this is the test data set I made myself which is similar to my original data.
I want to take out the data based on top 3 users who is logging in system more in last one hour…
With the above query I am getting all the users in the result but not on the basis of top 3 results. i want end result by aggregating total number of times user logged in, like maximum number of times.
For eg … user 1 logged in 18 times
user 2 logged in 5 times and user 3 did 5 times in last one hour …so I just want to see 3 result
with above query I am getting result of all the users 1,2,3,4,5,6 … without any sequence…
It’s just aggregating all the value for all the users
user 1 - 18
User 2 - 5
User 3 - 5
User 4 - 2
User 5 - 5
User 6 - 4
I just want it to show me just top 3 user who has higher aggregate value.