# Query to create some groups based on activity

**URL:** <https://meta.discourse.org/t/query-to-create-some-groups-based-on-activity/277156>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [August 30, 2023, 9:50am UTC](https://meta.discourse.org/t/query-to-create-some-groups-based-on-activity/277156 "2023-08-30T09:50:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![alefattorini](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alefattorini/32/119928_2.png) [@alefattorini](https://meta.discourse.org/u/alefattorini)\
**Post date:** [August 30, 2023, 9:50am UTC](https://meta.discourse.org/t/query-to-create-some-groups-based-on-activity/277156/1 "2023-08-30T09:50:27Z")

</div>

In my community I need to segment my people based on:

- likes received (30 - 100 - 200 )
- posts read 1k 2k 5k
- minimum of post over last year

How can I do this using the [data explorer](https://meta.discourse.org/t/32566?silent=true)?  
I’d like to have a query where I put those parameters and it lists the people, so I can add them manually to a group. Very easy  
Some hint? Where can I start from?

---

_[View the full topic](https://meta.discourse.org/t/query-to-create-some-groups-based-on-activity/277156)._
