Anyone want a (hopefully easy) challenge? A badge granted when someone posts a reply in a single specified topic. (i.e., A “Please introduce yourself here” topic.)
SELECT
DISTINCT ON (p.user_id)
p.user_id, p.id post_id, p.created_at granted_at
FROM badge_posts p
WHERE p.topic_id = 32 AND -- 32 is the "please introduce yourself" topic
(:backfill OR p.id IN (:post_ids) )
Triggered on “edit/create a post”.
16 个赞
Hi
I am seeking some help to do the following badge
I am trying to encourage users to post in a thread, I want them to post in this particular thread 10 times to earn this badge.
I was looking at
Which works for a single post, I am just unsure how to expand this out to 10 posts minimum.
1 个赞
Can’t seem to get this to work,
I’ve added;
SELECT
DISTINCT ON (p.user_id)
p.user_id, p.id post_id, p.created_at granted_at
FROM badge_posts p
WHERE p.topic_id = 172 AND
(:backfill OR p.id IN (:post_ids) )
But running the query isn’t bringing anyone back ![]()
Did you change the topic ID? the 172
1 个赞
Yeah, I think 172 is the topic number.
在新的 SQL 规则下,如何为在某个主题中自我介绍创建一个徽章?
