# Finding out how many users are watching or tracking?

**URL:** https://meta.discourse.org/t/finding-out-how-many-users-are-watching-or-tracking/56900
**Category:** Development
**Created:** [February 4, 2017, 10:21am UTC](https://meta.discourse.org/t/finding-out-how-many-users-are-watching-or-tracking/56900 "2017-02-04T10:21:52Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 4, 2017, 8:55pm UTC](https://meta.discourse.org/t/finding-out-how-many-users-are-watching-or-tracking/56900/2 "2017-02-04T20:55:01Z")

</div>

There are “\_user” tables.  
`category_users`, `topic_users`, `group_users` and `tag_users`  
Each has a `notification_level` field where the integer indicates a members preference - 0 Muted, 1 Normal, 2 Tracked, 3 Watched

So a query something like this should work

```plaintext
SELECT COUNT(id) 
FROM category_users 
WHERE notification_level = 3 
GROUP BY category_id 

```

to give you how many are Watching each category.

---

_[View the full topic](https://meta.discourse.org/t/finding-out-how-many-users-are-watching-or-tracking/56900)._
