Creating custom badge with custom rules

This is a SQL code of “Trigger: Update daily”;

SELECT st.user_id user_id, current_timestamp granted_at
FROM user_stats st
JOIN users u
ON st.user_id = u.id
WHERE st.post_count >= 2 AND st.likes_given >= 1 AND u.uploaded_avatar_id > 0

The other triggers depend on something specific, and I don’t recommend using them unless you find a SQL expert. (I’m not familiar with SQL myself