diff options
author | Neil Johnson <neil@matrix.org> | 2018-05-21 16:42:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-21 16:42:18 +0000 |
commit | 4aac88928f4411b5056552f06934327e382d9b8c (patch) | |
tree | 2c49b4d694805030c890b34ba25c1bb1ef464c55 | |
parent | Merge pull request #3239 from ptman/develop (diff) | |
parent | Tighter filtering for user_daily_visits (diff) | |
download | synapse-4aac88928f4411b5056552f06934327e382d9b8c.tar.xz |
Merge pull request #3251 from matrix-org/cohort_analytics
Tighter filtering for user_daily_visits
-rw-r--r-- | synapse/storage/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index ac264b5d25..979fa22438 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -379,7 +379,11 @@ class DataStore(RoomMemberStore, RoomStore, WHERE timestamp = ? ) udv 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 |