0

I can get the usage on each version using NRQL

SELECT count(*) FROM MobileSession since 1 day ago WHERE (appName = 'app-name') 
FACET (appVersion) limit MAX

but these are not unique Uuid, i.e. the same person/uuid having multiple session would be reported multiple times.

If I want unique UUID i.e. each version only reported once for each uuid, I thought I can use Sub-Query

SELECT count(*) FROM (
    SELECT count(*) FROM MobileSession WHERE (appName = 'app-name') 
    FACET appVersion, uuid limit MAX
) since 1 days ago FACET appVersion limit MAX

However, then I realize subquery only limit to 2000 entries

This makes the data incorrect as I increase the days value.

How can I use NRQL to get unique user using my App, group by the version they are using (across multiple days)?

Elye
  • 53,639
  • 54
  • 212
  • 474

1 Answers1

1

The uniqueCount() function should allow you to get the results you are looking for:

SELECT count(*) as 'Total Records' uniqueCount(uuid), uniqueCount(deviceUuid), uniqueCount(deviceManufacturer) FROM MobileSession since 1 day ago WHERE (appName ='app-name') 
FACET (appVersion) limit MAX

Note, I've added several different attributes (deviceUuid, deviceManufacturer) to illustrate the differences.