# 카테고리를 비공개로 전환하고 특정 그룹에 사용자 추가

**URL:** <https://meta.discourse.org/t/convert-a-category-to-private-and-add-users-to-a-specific-group-with-access/290463>\
**Category:** Product Support\
**Created:** [1월 4, 2024, 3:11오전 UTC](https://meta.discourse.org/t/convert-a-category-to-private-and-add-users-to-a-specific-group-with-access/290463 "2024-01-04T03:11:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jericson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jericson/32/116215_2.png) [@jericson](https://meta.discourse.org/u/jericson)\
**Post date:** [1월 4, 2024, 6:20오전 UTC](https://meta.discourse.org/t/convert-a-category-to-private-and-add-users-to-a-specific-group-with-access/290463/2 "2024-01-04T06:20:35Z")

</div>

> [@Crius](#):
>
> 과거 기간 동안 해당 주제에 참여한 모든 사용자를 식별하세요

`user_actions`를 기반으로 어떤 사용자가 주제에 참여했는지 파악하기 위해 [Data Explorer](https://meta.discourse.org/t/32566?silent=true) 쿼리를 사용했습니다:

```plaintext
-- [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

```

이 쿼리는 답변, 좋아요, 수정, 멘션과 같은 행동을 포함합니다. 또한 투표 응답을 포함하는 쿼리도 하나 더 가지고 있습니다. 이는 리드(잠재 고객) 수집을 위한 것이었지만, 답변 이외의 다른 활동을 한 사용자 중에도 해당 주제에 대해 권리를 주장할 수 있는 사람이 있을 것으로 예상됩니다. "참여"를 정의하는 것은 유용한 작업이 될 수 있습니다.

전체 카테고리로 확장하려면 `topics t on target_topic_id = t.id`와 조인하고 where 절에 `category_id`를 추가하면 됩니다. `ua.created_at`을 기준으로 시간 범위를 정의하는 것도 어렵지 않을 것입니다.

---

_[View the full topic](https://meta.discourse.org/t/convert-a-category-to-private-and-add-users-to-a-specific-group-with-access/290463)._
