diff options
author | 2020-10-30 23:57:51 +0000 | |
---|---|---|
committer | 2020-10-30 23:57:51 +0000 | |
commit | 7968dca8d3b6a9ae43e888bc045af211425acb28 (patch) | |
tree | 3c85f9e4d6eed6d3401189029773673f5c834ab2 | |
parent | Update docstring in metricity block query (diff) |
Indent metricity block query correctly
-rw-r--r-- | pydis_site/apps/api/models/bot/metricity.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pydis_site/apps/api/models/bot/metricity.py b/pydis_site/apps/api/models/bot/metricity.py index bb1db708..e7fc92fc 100644 --- a/pydis_site/apps/api/models/bot/metricity.py +++ b/pydis_site/apps/api/models/bot/metricity.py @@ -55,15 +55,15 @@ class Metricity: self.cursor.execute( """ SELECT - COUNT(*) - FROM ( - SELECT - (floor((extract('epoch' from created_at) / %d )) * %d) AS interval - FROM messages - WHERE - author_id='%s' - AND NOT is_deleted - GROUP BY interval + COUNT(*) + FROM ( + SELECT + (floor((extract('epoch' from created_at) / %d )) * %d) AS interval + FROM messages + WHERE + author_id='%s' + AND NOT is_deleted + GROUP BY interval ) block_query; """, [BLOCK_INTERVAL, BLOCK_INTERVAL, user_id] |