<commit_before>SELECT
    cm.email,
    SUM(
        CASE WHEN (vh.semester <> $1 OR vh.year <> $2 OR vh.num_hours IS NULL OR NOT vh.confirmed) THEN 0
        ELSE vh.num_hours END
    ) AS num_hours
FROM volunteer_hours_t vh
RIGHT JOIN community_members_t cm ON vh.community_member_id = cm.id
GROUP BY cm.email;
<commit_msg>Bugfix - only report cumulative hours from active users<commit_after>SELECT
    cm.email,
    SUM(
        CASE WHEN (vh.semester <> $1 OR vh.year <> $2 OR vh.num_hours IS NULL OR NOT vh.confirmed) THEN 0
        ELSE vh.num_hours END
    ) AS num_hours
FROM volunteer_hours_t vh
RIGHT JOIN community_members_t cm ON vh.community_member_id = cm.id
WHERE cm.active = TRUE
GROUP BY cm.email;

{'fraction_non_alphanumeric': 0.07412587412587412, 'fraction_numerical': 0.008391608391608392, 'mean_word_length': 3.1871345029239766, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '410856', 'n_tokens_mistral': 280, 'n_tokens_neox': 244, 'n_words': 84}