30 Sep 2022 07:27 PM - edited 30 Sep 2022 07:27 PM
Hi
I have 10+ applications where I want to get the screen widths. If I write the query for a single app the query works and I can get data for 365 days.
SELECT screenWidth as width, screenHeight as height, count(*) as "Session count" from usersession where useraction.application = "applicationname" group by screenWidth, screenHeight ORDER BY count(*) DESC
If I include ADD, (see below) the query fails as it tells me the data is limited to 51 and use TOP. Any idea as how I can get the data for all apps in a single query?
SELECT screenWidth as width, screenHeight as height, count(*) as "Session count" from usersession where useraction.application = "app1" AND useraction.application = "app 2" group by screenWidth, screenHeight ORDER BY count(*) DESC
Solved! Go to Solution.
30 Sep 2022 08:12 PM
Can you confirm that you are seeing all data in frist query? It should be also limited to 51, based on tests I have done in my env.
Also, RUM data is stored for 35 days maximum, you will not get 365 days anyway.
30 Sep 2022 08:34 PM
In the 1st query I get the data but it says "The default number of results aggregated from all screenHeight fields is limited to 51. To modify this limit, use the TOP() function in SELECT."
When I do the 2nd query I see no data at all.
30 Sep 2022 08:50 PM - edited 30 Sep 2022 08:50 PM
Oh I understood now.
Change the AND condition in Where to OR.
SELECT screenWidth as width, screenHeight as height, count(*) as "Session count" from usersession where useraction.application = "app1" OR useraction.application = "app 2" group by screenWidth, screenHeight ORDER BY count(*) DESC
When using AND, you are querying the sessions that shares both apps. Change to OR and you will get the data from both apps independently .
30 Sep 2022 09:10 PM
Great..this works. Thanks much for the quick reply