# Is there a way to see the number of watchers for a category?

**URL:** https://meta.discourse.org/t/is-there-a-way-to-see-the-number-of-watchers-for-a-category/159696
**Category:** Support
**Created:** [3 augustus 2020 om 18:49 UTC](https://meta.discourse.org/t/is-there-a-way-to-see-the-number-of-watchers-for-a-category/159696 "2020-08-03T18:49:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![redwolves](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/redwolves/32/188980_2.png) [@redwolves](https://meta.discourse.org/u/redwolves)
#### Post date: [3 augustus 2020 om 18:49 UTC](https://meta.discourse.org/t/is-there-a-way-to-see-the-number-of-watchers-for-a-category/159696/1 "2020-08-03T18:49:58Z")

</div>

We’re using categories as a way to stay up to date on certain topics and we are encouraging our users to subscribe/watch the category so they get the information in their email fast.

We want to measure the success of this initiative but we can’t seem to find a way to see how many users are watching a category.

Is this possible? Even if the data is in the database we can pull that would be great.

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [3 augustus 2020 om 21:39 UTC](https://meta.discourse.org/t/is-there-a-way-to-see-the-number-of-watchers-for-a-category/159696/2 "2020-08-03T21:39:47Z")

</div>

I imagine you could write a [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [3 augustus 2020 om 21:47 UTC](https://meta.discourse.org/t/is-there-a-way-to-see-the-number-of-watchers-for-a-category/159696/3 "2020-08-03T21:47:37Z")

</div>

Try:

```plaintext
SELECT c.id as ID,
c.name as NAME, 
cu.notification_level as NOTIFICATION_LEVEL,
CASE cu.notification_level
WHEN 0 THEN 'MUTED' 
WHEN 1 THEN 'REGULAR' 
WHEN 2 THEN 'TRACKING'
WHEN 3 THEN 'WATCHING'
WHEN 4 THEN 'WATHING FIRST POST' END as NOTIFICATION_LEVEL_DESC,
COUNT(cu.id) as COUNT_OF_TYPE
FROM category_users cu
JOIN categories c ON cu.category_id = c.id
GROUP BY c.id, c.name, cu.notification_level, notification_level_desc
ORDER BY c.name, cu.notification_level

```

---

<div class="post-metadata">

### Author: ![redwolves](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/redwolves/32/188980_2.png) [@redwolves](https://meta.discourse.org/u/redwolves)
#### Post date: [4 augustus 2020 om 16:00 UTC](https://meta.discourse.org/t/is-there-a-way-to-see-the-number-of-watchers-for-a-category/159696/4 "2020-08-04T16:00:08Z")

</div>

Thank you @merefield that got me 90% of what I needed and I was able to update your SQL statement to my needs like so:

```
SELECT c.name as NAME, 
COUNT(cu.id) as subscribers
FROM category_users cu
JOIN categories c ON cu.category_id = c.id
WHERE 
    c.name LIKE '%Announcements%'
    AND
    (cu.notification_level = 2 
    OR 
    cu.notification_level = 3 
    OR 
    cu.notification_level = 4)
GROUP BY c.id, c.name
ORDER BY subscribers DESC, c.name

```

---

<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: [3 september 2020 om 16:00 UTC](https://meta.discourse.org/t/is-there-a-way-to-see-the-number-of-watchers-for-a-category/159696/5 "2020-09-03T16:00:33Z")

</div>

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