Skip to content
Snippets Groups Projects
Unverified Commit 4aac8892 authored by Neil Johnson's avatar Neil Johnson Committed by GitHub
Browse files

Merge pull request #3251 from matrix-org/cohort_analytics

Tighter filtering for user_daily_visits
parents d689e0db 644aac5f
No related branches found
No related tags found
No related merge requests found
...@@ -379,7 +379,11 @@ class DataStore(RoomMemberStore, RoomStore, ...@@ -379,7 +379,11 @@ class DataStore(RoomMemberStore, RoomStore,
WHERE timestamp = ? WHERE timestamp = ?
) udv ) udv
ON u.user_id = udv.user_id AND u.device_id=udv.device_id ON u.user_id = udv.user_id AND u.device_id=udv.device_id
WHERE last_seen > ? AND last_seen <= ? AND udv.timestamp IS NULL INNER JOIN users ON users.name=u.user_id
WHERE last_seen > ? AND last_seen <= ?
AND udv.timestamp IS NULL AND users.is_guest=0
AND users.appservice_id IS NULL
GROUP BY u.user_id, u.device_id
""" """
# This means that the day has rolled over but there could still # This means that the day has rolled over but there could still
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment