# Active users for specific months

**URL:** https://meta.discourse.org/t/active-users-for-specific-months/51495
**Category:** Data & reporting
**Tags:** sql-query
**Created:** [October 13, 2016, 10:15am UTC](https://meta.discourse.org/t/active-users-for-specific-months/51495 "2016-10-13T10:15:05Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [October 17, 2016, 4:56pm UTC](https://meta.discourse.org/t/active-users-for-specific-months/51495/3 "2016-10-17T16:56:06Z")

</div>

My guess is not “dumb” but that the weekend happened.

Have you seen this post?

> [@Posts created for period](https://meta.discourse.org/t/posts-created-for-period/275138):
>
> Posts created for period Got what I need (thanks @meglio) so updating this for future posterity. -- [params] -- date :date\_from -- date :date\_to -- int :min\_posts = 1 WITH user\_activity AS ( SELECT p.user\_id, count (p.id) as posts\_count FROM posts p LEFT JOIN topics t ON t.id = p.topic\_id WHERE p.created\_at::date BETWEEN :date\_from::date AND :date\_to::date AND t.deleted\_at IS NULL AND t.visible = TRUE AND t.closed = FALSE AND t.archived = FALSE…

---

_[View the full topic](https://meta.discourse.org/t/active-users-for-specific-months/51495)._
