Fix: missing search_cids

This commit is contained in:
Luc Mcgrady 2025-05-25 16:07:25 +01:00
parent dc1489fe98
commit ae30fa90f1
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C

View file

@ -2,6 +2,7 @@ WITH searched_revlogs AS (
SELECT *
FROM revlog
WHERE ease > 0
AND cid IN search_cids
ORDER BY id DESC -- Use the last 10_000 reviews
LIMIT 10000
), average_pass AS (
@ -18,7 +19,10 @@ lapse_count AS (
fail_sum AS (
SELECT SUM(time) AS total_fail_time
FROM searched_revlogs
WHERE (ease = 1 AND type = 1)
WHERE (
ease = 1
AND type = 1
)
OR type = 2
),
-- (sum(Relearning) + sum(Lapses)) / count(Lapses)