# كيفية العثور على أفضل المستخدمين جودة حسب الفئة؟

**URL:** https://meta.discourse.org/t/how-to-find-top-quality-users-by-category/202263
**Category:** Support
**Created:** [31 أغسطس 2021، 6:15م 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

<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: [31 أغسطس 2021، 6:15م 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 …

كنت أبحث عن كيفية العثور على المستخدم الأكثر قيمة في فئة معينة ووجدت هذا، وأتساءل عن كيفية استخدام استعلام مماثل بناءً على الفئة.

كنت أحاول الاستعلام عن المنشورات بناءً على معرف الفئة، لكنني وجدت أن معرف الفئة غير موجود في جدول المنشورات.
