Using CloudWatch logs insights I am trying to find the number of users who have interacted with my service more than 5 times. I have extracted the @userId
field from my logs.
stats count(*) as used by @userId
| filter used>5
Using this query I am getting all the users but I want to get the count of such users rather than the users themselves. So I tried
stats count(*) as used by @userId
| filter used>5
| stats count(*)
but that gives an error probably because we cannot use stats twice in the same query (not sure of the reason). Looking for a way to get the required data.