Level 3 - Question 53
Question
Return an activity histogram that shows users by grouping them together based on the number of active days they have had in the previous month.
Take Note:
This query is doing a very similar thing to the last few questions we worked through. But instead we’re counting the number of active days that a user has had in a given month so we can return a histogram of users based on how many days they have had in a specific month, versus counting binary criteria of whether they were or were not active over a several month-long period. Here we’re able to easily see what the average or most common number of days your users are active. In the results, we can see that every user who has had 7 days has been grouped into the 7-day bucket, and every user who has had 6 days has been grouped into the 6-day bucket, and so on. This is because the actor property we created counts the number of days that each user had in that time period and returns a value for them. In this query we’re simply saying count users and split them up by the bucket they fall into in actor property 52, show it as a bar and as a fraction of all users.