Request: Custom Badge SQL for total Like count

Hello and welcome @rapphann :slight_smile:

I’m afraid I’m not a SQL master either :slight_smile: But I would think it would be something like this:

SELECT us.user_id, current_timestamp AS granted_at 
FROM user_stats AS us 
WHERE us.likes_received >= 100 
AND us.likes_given >= 100
AND (:backfill OR us.user_id IN (:user_ids))