# איך למצוא את המשתמשים הפעילים ביותר בחודש האחרון

**URL:** https://meta.discourse.org/t/how-to-find-the-most-active-users-over-the-last-month/297645
**Category:** Data & reporting
**Created:** [3 במרץ,‏ 2024,‏ 1:54am UTC](https://meta.discourse.org/t/how-to-find-the-most-active-users-over-the-last-month/297645 "2024-03-03T01:54:25Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![AaronW](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@AaronW](https://meta.discourse.org/u/AaronW)
#### Post date: [3 במרץ,‏ 2024,‏ 1:54am UTC](https://meta.discourse.org/t/how-to-find-the-most-active-users-over-the-last-month/297645/1 "2024-03-03T01:54:26Z")

</div>

Is there a way to find out who has posted the most over the last 30 days? Basically would be the Admin-\>Users-\> active user list but with a filter of a month?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [3 במרץ,‏ 2024,‏ 3:29am UTC](https://meta.discourse.org/t/how-to-find-the-most-active-users-over-the-last-month/297645/2 "2024-03-03T03:29:13Z")

</div>

Hello, welcome 👋

This query should help:

```sql
--[params]
--date :start_date = 2024-01-01
--date :end_date = 2024-02-01
--int :top = 10

SELECT
   u.id AS user_id,
   COUNT(*) Count 
FROM posts AS p
INNER JOIN users AS u on p.user_id = u.id
INNER JOIN topics AS t ON t.id = p.topic_id AND t.deleted_at ISNULL
WHERE p.created_at::date BETWEEN :start_date AND :end_date
   AND p.deleted_at ISNULL
   AND t.archetype = 'regular'
   AND p.post_type = 1
GROUP BY u.id, u.username
ORDER BY Count DESC
LIMIT :top

```

> [@AaronW](#):
>
> Basically would be the Admin-\>Users-\> active user list but with a filter of a month?

I believe “active” users here are sorted by “last seen at” date, not posts. 🤔

---

<div class="post-metadata">

### Author: ![AaronW](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@AaronW](https://meta.discourse.org/u/AaronW)
#### Post date: [4 במרץ,‏ 2024,‏ 7:08pm UTC](https://meta.discourse.org/t/how-to-find-the-most-active-users-over-the-last-month/297645/3 "2024-03-04T19:08:35Z")

</div>

So looking up how to run a SQL Query, I need a plug in that is at a more expensive plan, since we are pretty small, I don’t think that access to SQL queries would worth the 3x cost. So for us, I guess the answer is, no we can’t do it.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [4 במרץ,‏ 2024,‏ 7:49pm UTC](https://meta.discourse.org/t/how-to-find-the-most-active-users-over-the-last-month/297645/4 "2024-03-04T19:49:43Z")

</div>

Would the user directory help here? Eg

[https://meta.discourse.org/u?order=post\_count&period=monthly](https://meta.discourse.org/u?order=post_count&period=monthly)

It won’t be as accurate as a [data explorer](https://meta.discourse.org/t/32566?silent=true) query, but it may suffice?

You can select the period, click on the column headers to add a sort, filter by group, and even add extra columns using the wrench.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [4 במרץ,‏ 2024,‏ 7:53pm UTC](https://meta.discourse.org/t/how-to-find-the-most-active-users-over-the-last-month/297645/5 "2024-03-04T19:53:27Z")

</div>

Wow, how did I miss this? Thanks, Jammy. 😄

---

<div class="post-metadata">

### Author: ![AaronW](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@AaronW](https://meta.discourse.org/u/AaronW)
#### Post date: [4 במרץ,‏ 2024,‏ 8:13pm UTC](https://meta.discourse.org/t/how-to-find-the-most-active-users-over-the-last-month/297645/6 "2024-03-04T20:13:30Z")

</div>

Thanks, not sure how I missed that too.

---

<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 באפריל,‏ 2024,‏ 8:13pm UTC](https://meta.discourse.org/t/how-to-find-the-most-active-users-over-the-last-month/297645/7 "2024-04-03T20:13:57Z")

</div>

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