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
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.”
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 .