diff --git a/stats.py b/stats.py index 342423a..026e267 100644 --- a/stats.py +++ b/stats.py @@ -179,7 +179,7 @@ def get_retention_graph(self: CollectionStats): COUNT(CASE WHEN ease > 1 AND lastIvl < {config.mature_ivl} AND lastIvl > {config.mature_ivl} * -86400 THEN id ELSE NULL END) / (COUNT(CASE WHEN lastIvl < {config.mature_ivl} AND lastIvl > {config.mature_ivl} * -86400 THEN id ELSE NULL END) + 0.0001), COUNT(CASE WHEN ease > 1 AND (lastIvl >= {config.mature_ivl} OR lastIvl <= {config.mature_ivl} * -86400) THEN id ELSE NULL END) / (COUNT(CASE WHEN lastIvl >= {config.mature_ivl} OR lastIvl <= {config.mature_ivl} * -86400 THEN id ELSE NULL END) + 0.0001) FROM revlog - WHERE (type = 1 OR lastIvl <= -86400 OR lastIvl >= 1) + WHERE ease >= 1 AND (type = 1 OR lastIvl <= -86400 OR lastIvl >= 1) {lim} GROUP BY day """