# 是否有办法查看某个分类的关注者数量？

**URL:** <https://meta.discourse.org/t/is-there-a-way-to-see-the-number-of-watchers-for-a-category/159696>\
**Category:** Product Support\
**Created:** [2020 年8 月 3 日 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:** 1\
**Showing post:** 4

<div class="post-metadata">

作者： ![redwolves](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/redwolves/32/188980_2.png) [@redwolves](https://meta.discourse.org/u/redwolves)\
发布日期： [2020 年8 月 4 日 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>

谢谢 @merefield，这帮我解决了 90% 的需求。我能够根据你的 SQL 语句按我的需求进行了如下调整：

```
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

```

---

_[View the full topic](https://meta.discourse.org/t/is-there-a-way-to-see-the-number-of-watchers-for-a-category/159696)._
