Fixed answer db views, seperate name for generated time in seconds

This commit is contained in:
BroodjeAap 2020-11-23 17:33:31 +01:00
parent d81de96800
commit 1728ef4690

View file

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