# Find users who read specific topics

**URL:** <https://meta.discourse.org/t/find-users-who-read-specific-topics/100657>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [28.Октябрь.2018 04:04:16 UTC](https://meta.discourse.org/t/find-users-who-read-specific-topics/100657 "2018-10-28T04:04:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)\
**Post date:** [29.Октябрь.2018 16:55:30 UTC](https://meta.discourse.org/t/find-users-who-read-specific-topics/100657/4 "2018-10-29T16:55:30Z")

</div>

For Topic Participants you could use something like this

```plaintext
-- [params]
-- null string_list :topic_id
WITH user_data AS (
  SELECT u.username, ue.email, tu.topic_id FROM users u
    LEFT JOIN topic_users tu ON u.id = tu.user_id AND tu.posted = true
    LEFT JOIN user_emails ue on u.id = ue.user_id
)
SELECT * FROM user_data WHERE topic_id = :topic_id

```

You would then just need to enter the relevant topic id in the box that is required.

---

_[View the full topic](https://meta.discourse.org/t/find-users-who-read-specific-topics/100657)._
