diff options
author | 2020-10-27 01:57:06 +0000 | |
---|---|---|
committer | 2020-10-27 01:57:06 +0000 | |
commit | 2337453ef485017b519c47f31129063e0a0de011 (patch) | |
tree | 717db0553b0b2de8614fbdbfea816313edf97ea9 /pydis_site | |
parent | Update tests with new activity_blocks key (diff) |
Clean up SQL query
Diffstat (limited to 'pydis_site')
-rw-r--r-- | pydis_site/apps/api/models/bot/metricity.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pydis_site/apps/api/models/bot/metricity.py b/pydis_site/apps/api/models/bot/metricity.py index afbcbad8..93d0df71 100644 --- a/pydis_site/apps/api/models/bot/metricity.py +++ b/pydis_site/apps/api/models/bot/metricity.py @@ -57,7 +57,11 @@ class Metricity: to_timestamp(floor((extract('epoch' from created_at) / 600 )) * 600) AT TIME ZONE 'UTC' AS interval FROM messages - WHERE author_id='%s' AND NOT is_deleted GROUP BY interval) block_query; + WHERE + author_id='%s' + AND NOT is_deleted + GROUP BY interval + ) block_query; """, [user_id] ) |