A badge granted when someone posts a reply in a single specified topic

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.)

9 Me gusta
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 Me gusta

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 me gusta

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 :cry:

Did you change the topic ID? the 172

1 me gusta

Yeah, I think 172 is the topic number.

Con las nuevas reglas de SQL, ¿cómo crearías una insignia para presentarte en un tema?

He utilizado esta consulta…

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 = 6671 AND -- 6671 es el tema "Presentate"
  (:backfill OR p.id IN (:post_ids) )

Con la siguiente configuración

2 Me gusta