mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	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:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							a7c40748fd
						
					
				
				
					commit
					dc0b8bcb6b
				
			@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user