I think if you add another field like the “visited_at” it woks.
Because you’re using just user_id and current_timestamp, and they are distinct just in user_id, because current_timestamp would be the same every row.
If you add visited_at they could be distinct, and them one badge for every day.
But maybe you already solve this
Edit1: Actually, I dont think this query need the distinct
Building on from what @Rafael_Lima_Vasconce suggested, I created the following as an example “Easter 2019” badge.
I have absolutely no experience with SQL besides just modifying numerical values on some of the cool badge queries that have been posted here, but I don’t see any indication that this shouldn’t work (assuming you’re still trying to find a solution).
If you wanted people to receive the badge multiple times, I believe just enabling that tick option when setting up your badge should do so. Otherwise, it should only give them the badge the first time they visit during the specified time-span.