# 특정 주제를 본 사용자를 추적하는 방법은?

**URL:** https://meta.discourse.org/t/how-to-track-which-users-viewed-a-particular-topic/161260
**Category:** Feature
**Created:** [8월 18, 2020, 10:57오전 UTC](https://meta.discourse.org/t/how-to-track-which-users-viewed-a-particular-topic/161260 "2020-08-18T10:57:06Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [8월 18, 2020, 3:36오후 UTC](https://meta.discourse.org/t/how-to-track-which-users-viewed-a-particular-topic/161260/6 "2020-08-18T15:36:32Z")

</div>

링크하신 게시글에 실제로 예시가 있는 것 같습니다:

> [@ditatompel](#):
>
> # 특정 토픽을 보는 사용자(로그인된 사용자)
> 
> ```plaintext
> -- [params]
> -- int :topic_id = 1
> 
> SELECT
> title,
> viewed_at,
> tv.user_id
> FROM topics t
> LEFT JOIN topic_views tv
> ON t.id = tv.topic_id
> WHERE category_id IS NOT NULL
> AND tv.user_id IS NOT NULL
> AND t.id = :topic_id
> ORDER BY viewed_at DESC
> LIMIT 1000
> 
> ```

---

_[View the full topic](https://meta.discourse.org/t/how-to-track-which-users-viewed-a-particular-topic/161260)._
