Badge voor posts gemaakt tussen 1 uur 's nachts en 5 uur 's ochtends

It is possible to filter as follows:

SELECT 
    user_id, 
    current_timestamp granted_at 
FROM badge_posts p  
WHERE p.created_at::time BETWEEN '01:00' AND '05:00'
GROUP BY user_id 
HAVING count(*) >= 100

I hope it helps