analytics: Update query for remote_push_devices in remote activity.

Updates query to count the distinct pairs of user_id and user_uuid
on the RemotePushDeviceToken table.
This commit is contained in:
Lauryn Menard 2023-12-04 19:37:49 +01:00 committed by Tim Abbott
parent a7c40748fd
commit dc0b8bcb6b
1 changed files with 4 additions and 1 deletions

View File

@ -41,7 +41,10 @@ def get_remote_server_activity(request: HttpRequest) -> HttpResponse:
group by server_id
),
remote_push_devices as (
select server_id, count(distinct(user_id)) as push_user_count from zilencer_remotepushdevicetoken
select
server_id,
count(distinct(user_id, user_uuid)) as push_user_count
from zilencer_remotepushdevicetoken
group by server_id
)
select