Fix SQL queries on demographics page

This commit is contained in:
Noah Petherbridge 2024-09-11 19:49:17 -07:00
parent 02487ba2f4
commit 7991320256

View File

@ -123,6 +123,8 @@ func PeopleStatistics() People {
COUNT(*) AS user_count COUNT(*) AS user_count
FROM FROM
users users
WHERE users.status = 'active'
AND users.certified IS TRUE
GROUP BY GROUP BY
CASE CASE
WHEN DATE_PART('year', AGE(birthdate)) BETWEEN 0 AND 25 THEN '18-25' WHEN DATE_PART('year', AGE(birthdate)) BETWEEN 0 AND 25 THEN '18-25'