added rounding to 1 decimal place to sqlite answer stats queries
This commit is contained in:
parent
bc8b08bcf4
commit
ae2264c706
1 changed files with 4 additions and 4 deletions
|
@ -134,7 +134,7 @@ class PracticeDatabase {
|
|||
correct,
|
||||
incorrect,
|
||||
total,
|
||||
(correct / total) * 100 AS ratio
|
||||
ROUND((correct / total) * 100, 1) AS ratio
|
||||
FROM
|
||||
AnswersCorrectByTypeViewAll
|
||||
UNION ALL
|
||||
|
@ -144,7 +144,7 @@ class PracticeDatabase {
|
|||
correct,
|
||||
incorrect,
|
||||
total,
|
||||
(correct / total) * 100 AS ratio
|
||||
ROUND((correct / total) * 100, 1) AS ratio
|
||||
FROM
|
||||
AnswersCorrectByTypeView7d
|
||||
UNION ALL
|
||||
|
@ -154,7 +154,7 @@ class PracticeDatabase {
|
|||
correct,
|
||||
incorrect,
|
||||
total,
|
||||
(correct / total) * 100 AS ratio
|
||||
ROUND((correct / total) * 100, 1) AS ratio
|
||||
FROM
|
||||
AnswersCorrectByTypeView30d;
|
||||
''');
|
||||
|
@ -173,7 +173,7 @@ class PracticeDatabase {
|
|||
["All", "30d", "7d"].forEach((range) => {
|
||||
PracticeType.values.forEach((type) {
|
||||
var typeRange = "$range ${type.toString().split(".").last}";
|
||||
emptyStats[typeRange] = 0;
|
||||
emptyStats[typeRange] = 0.0;
|
||||
})
|
||||
});
|
||||
return emptyStats;
|
||||
|
|
Loading…
Add table
Reference in a new issue