Badge query for topic views

Is there a badge query that gives the badge if any one of a users topic has over 1,000 views?

I found this badge query.

SELECT p.user_id, min(p.created_at) granted_at, MIN(p.id) post_id
FROM badge_posts p
JOIN topics t ON t.id = p.topic_id
WHERE category_id = (
  SELECT id FROM categories WHERE name ilike 'Technology'
) AND p.post_number = 1
AND views >= 10
and (:backfill OR ( p.id IN (:post_ids) ))
GROUP BY p.user_id

Note this is not mine. Here is the OP.

1 Like

It doesn’t work sadly, works on the preview, but when i save it says “Sorry, an error has occurred.”

Wait nvm, it works, i had a nother badge wih the same name

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.