# Trouver les utilisateurs qui ont lu des sujets spécifiques

**URL:** <https://meta.discourse.org/t/find-users-who-read-specific-topics/100657>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [Octobre 28, 2018, 4:04 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:** 9

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [Octobre 29, 2018, 11:23 UTC](https://meta.discourse.org/t/find-users-who-read-specific-topics/100657/9 "2018-10-29T23:23:28Z")

</div>

You can get more data from that query by selecting for more fields from the `topic_users` table. To find whether the user liked a post, or posted in the topic, try this:

```plaintext
-- [params]
-- null string_list :topic_id
WITH user_data AS (
  SELECT u.username, ue.email, tu.topic_id, tu.posted, tu.liked 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

```

---

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