Creating custom badge with custom rules

I have installed the plugin and made the below SQL command which is giving me the users who are fulfilling these 3 rules but I don’t know how to convert it into a trigger when an user acts on the post.

SQL command -
select users.username, user_stats.user_id from user_stats Inner Join users ON user_stats.user_id = users.id where post_count = 2 AND likes_given = 1 AND uploaded_avatar_id > 0

Following this post Create Triggered Custom Badge Queries but still unable to create because I am really new to the discourse.

Kindly help me out to fix this, if I can complete this once then I can build my other own custom badges too with less friction.
@Lhc_fl

1 Like