Convert a category to private and add users to a specific group with access

I’ve used a Data Explorer query to figure out who participated in a topic based on user_actions:

-- [params]
-- int :topic = 3620561


select user_id, 
       sum(action_type) actions,
       sum(case action_type when 5 then 1 else 0 end) replies 
from user_actions ua
     join users u on u.id = ua.user_id
where target_topic_id = :topic
      and moderator is false
      and admin is false
group by ua.user_id

That includes actions such as replies, likes, edits and mentions. I also have a query that includes poll responses. This was for gathering leads, but I expect some of the people who did something besides reply might have a claim on the topic. Defining “participated” might be a useful exercise.

To expand to the entire category, join with topics t on target_topic_id = t.id and add category_id to the where clause. Shouldn’t be hard to define the timeframe based on ua.created_at.

2 Likes