I’m afraid I became addicted to these badges
So this one it will be granted to users who created posts between 1 AM and 5 AM, updated daily.
But unfortunately, I have no idea how to select that interval. Any help is appreciated.
SELECT user_id, current_timestamp granted_at FROM badge_posts p WHERE p.created_at > CURRENT_DATE /* How to between '1AM' and '5AM' ? */ GROUP BY user_id HAVING count(*) >= 100