# Can I generate a report of users who have NOT posted in a given topic?

**URL:** https://meta.discourse.org/t/can-i-generate-a-report-of-users-who-have-not-posted-in-a-given-topic/111425
**Category:** Support
**Created:** [3월 12, 2019, 9:08오후 UTC](https://meta.discourse.org/t/can-i-generate-a-report-of-users-who-have-not-posted-in-a-given-topic/111425 "2019-03-12T21:08:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![craigconstantine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/craigconstantine/32/511195_2.png) [@craigconstantine](https://meta.discourse.org/u/craigconstantine)
#### Post date: [3월 12, 2019, 9:08오후 UTC](https://meta.discourse.org/t/can-i-generate-a-report-of-users-who-have-not-posted-in-a-given-topic/111425/1 "2019-03-12T21:08:35Z")

</div>

Subject says it all…

Can I see a list of users who have not posted in a particular category? I’m trying to find users who aren’t actively posting so I can try to interact with them more…

---

<div class="post-metadata">

### Author: ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)
#### Post date: [3월 12, 2019, 9:34오후 UTC](https://meta.discourse.org/t/can-i-generate-a-report-of-users-who-have-not-posted-in-a-given-topic/111425/3 "2019-03-12T21:34:32Z")

</div>

I think you can do it with [Data Explorer](https://meta.discourse.org/t/32566?silent=true) Plugin. 👍

---

<div class="post-metadata">

### Author: ![bts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bts/32/184556_2.png) [@bts](https://meta.discourse.org/u/bts)
#### Post date: [3월 12, 2019, 9:38오후 UTC](https://meta.discourse.org/t/can-i-generate-a-report-of-users-who-have-not-posted-in-a-given-topic/111425/4 "2019-03-12T21:38:31Z")

</div>

With [data explorer](https://meta.discourse.org/t/32566?silent=true), something like this should do the trick, for a given topic:

```plaintext
-- [params]
-- int :topic_id = 1

SELECT id, username
FROM users u
WHERE u.id NOT IN 
(SELECT user_id FROM posts WHERE topic_id=:topic_id)

```

And for users who have not posted in a given category, something like:

```plaintext
-- [params]
-- int :cat_id = 1

SELECT id, username
FROM users u
WHERE u.id NOT IN 
(SELECT user_id FROM posts WHERE topic_id IN
    (SELECT id from topics where category_id=:cat_id)
)

```

(You can find category ids by running `select id, name from categories`).

Hmm actually that second query doesn’t seem to work for me for all categories though, not sure why, maybe someone else can test / tweak if needed!

---

<div class="post-metadata">

### Author: ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)
#### Post date: [3월 12, 2019, 10:00오후 UTC](https://meta.discourse.org/t/can-i-generate-a-report-of-users-who-have-not-posted-in-a-given-topic/111425/5 "2019-03-12T22:00:46Z")

</div>

What about something like this? 🤔

```sql
-- [params]
-- int :cat_id = 4
-- int :limit = 10

SELECT id, username
FROM users u
WHERE u.id NOT IN 
(SELECT user_id FROM categories WHERE id=:cat_id)
LIMIT :limit

```

---

<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: [3월 13, 2019, 12:44오전 UTC](https://meta.discourse.org/t/can-i-generate-a-report-of-users-who-have-not-posted-in-a-given-topic/111425/6 "2019-03-13T00:44:13Z")

</div>

For sites that have the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) plugin installed, the easiest approach would be to write a [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query to get the results. On a busy forum, you might need to refine your criteria to avoid returning too many users.

For sites that don’t have the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) plugin - especially for sites that don’t have many users - you can find users who aren’t actively posting by going to the site’s users page. On that page, you can select a time period from the time filter that’s at the top-left of the page. You can then find users who aren’t posting by clicking on either the ‘Topics’ or the ‘Replies’ table headers. When the caret icon next to a table header is pointing up, the table will display results in ascending order. Here’s an example from meta: [https://meta.discourse.org/u?asc=true&order=post\_count](https://meta.discourse.org/u?asc=true&order=post_count).

While the approach won’t tell you which categories users are posting in, it will give information about who is active on the site.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [4월 12, 2019, 12:44오전 UTC](https://meta.discourse.org/t/can-i-generate-a-report-of-users-who-have-not-posted-in-a-given-topic/111425/7 "2019-04-12T00:44:17Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
