# How to find top quality users by category?

**URL:** <https://meta.discourse.org/t/how-to-find-top-quality-users-by-category/202263>\
**Category:** Product Support\
**Created:** [August 31, 2021, 6:15pm UTC](https://meta.discourse.org/t/how-to-find-top-quality-users-by-category/202263 "2021-08-31T18:15:32Z")\
**Posts on this page:** 1\
**Page:** 1

## AI-generated summary

In the Support category, [th21](/t/-/202263/1) seeks a method to identify the most valuable users within a specific category, referencing a similar query found on the Discourse Meta forum. The user attempted to filter posts by category ID but encountered a technical limitation, noting that the category ID is not directly available in the posts table.

<div class="post-metadata">

**Author:** ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)\
**Post date:** [August 31, 2021, 6:15pm UTC](https://meta.discourse.org/t/how-to-find-top-quality-users-by-category/202263/1 "2021-08-31T18:15:32Z")

</div>

> [@Add username to two queries](https://meta.discourse.org/t/add-username-to-two-queries/123531):
>
> Hi, I decide to open new topic for this: Top quality users in last six months Well, for the Top quality users in last six months, I used the [2nd version from query](https://github.com/SidVal/discourse-data-explorer/blob/queries/queries/top-quality-users.sql). And I added the username; and a :limit param. -- [params] -- int :limit = 20 SELECT sum(p.score) / count(p) as "average score per post", count(p.id) as post\_count, -- p.user\_id, u.username FROM posts p JOIN users u ON u.id = p.user\_id WHERE p.created\_at \>= CURRENT\_DATE - INTERVAL '6 month' AND NOT u.admin …

Was looking for how to find most valuable user in a specific category and find this, wonder how to utilize a simliar query based on category.

I was trying to query on post by category id but find the category id is not presented on posts table.
