Fixed time filtering for week/month stats

This commit is contained in:
BroodjeAap 2020-11-10 17:44:58 +01:00
parent a127691f65
commit 65846043df

View file

@ -70,7 +70,7 @@ class PracticeDatabase {
FROM FROM
AnswersView AnswersView
WHERE WHERE
time < before time > before
GROUP BY GROUP BY
type; type;
'''); ''');
@ -86,13 +86,13 @@ class PracticeDatabase {
AS INTEGER AS INTEGER
) as time, ) as time,
CAST( CAST(
strftime("%s", DATETIME('now', '-1 month ')) strftime("%s", DATETIME('now', '-1 month'))
AS INTEGER AS INTEGER
) as before ) as before
FROM FROM
AnswersView AnswersView
WHERE WHERE
time < before time > before
GROUP BY GROUP BY
type; type;
'''); ''');