I want to find the average time spent on a specific url page. I currently know how to find the total session length, however, I do not know how to determine the aggregate of total session lengths for a specific page, and further take the average of that total session length.
Thanks for referring me to this post. I have tried doing a similar query to this before and like the one in the post tagged, I struggled to take the average of all of the sessions. Do you have any idea on how I’d be able to get the average of all of the facet’d sessions so I get one number?
Hi, @Gwiggins: Try this:
SELECT average(`Session Length`) FROM (SELECT ((max(timestamp) - min(timestamp)) / 1000 / 60) AS 'Session Length' FROM PageView FACET session) SINCE 1 day ago LIMIT MAX