diff --git a/migrations/2024-12-18-214511_site-stats/up.sql b/migrations/2024-12-18-214511_site-stats/up.sql index d465a2c..2deea1f 100644 --- a/migrations/2024-12-18-214511_site-stats/up.sql +++ b/migrations/2024-12-18-214511_site-stats/up.sql @@ -102,7 +102,7 @@ DECLARE count_ integer; BEGIN SELECT - count(*) INTO count_ + count(users) INTO count_ FROM ( SELECT e.creator_id @@ -111,7 +111,7 @@ BEGIN INNER JOIN person p ON e.creator_id = p.id WHERE e.published > ('now'::timestamp - i::interval) - AND p.local = TRUE); + AND p.local = TRUE) as users; RETURN count_; END; $$;