# Is it possible to build elasticsearch-range-aggretaion-of-aggregation

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-build-elasticsearch-range-aggretaion-of-aggregation/258537>\
**Category:** Elasticsearch\
**Created:** [December 14, 2020, 5:34am UTC](https://discuss.elastic.co/t/is-it-possible-to-build-elasticsearch-range-aggretaion-of-aggregation/258537 "2020-12-14T05:34:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ju\_Cheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ju_cheng/32/77923_2.png) [@Ju\_Cheng](https://discuss.elastic.co/u/Ju_Cheng)\
**Post date:** [December 14, 2020, 5:34am UTC](https://discuss.elastic.co/t/is-it-possible-to-build-elasticsearch-range-aggretaion-of-aggregation/258537/1 "2020-12-14T05:34:42Z")

</div>

I am new to elasticsearch and my log are about users and the conferences they participate, like

```auto
{"userid": "user1", "conferencesId": "c2", "action":"blabla" ... }
{"userid": "user2", "conferencesId": "c2", "action":"blabla" ...}

{"userid": "user3", "conferencesId": "c5", "action":"blabla" ...}
{"userid": "user3", "conferencesId": "c1", "action":"blabla" ...}

```

and I would like to get range distribution of conference participants, like:

```auto
participants less than 3: 231
participants between 3 and 5: 54
participants greater than 5: 12

```

how to build the range query in elasticsearch? is it possible?

IMO, the problems is about "the distribution of unique count of users per unique conference", I would created a temporary table if using mySQL...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 11, 2021, 5:35am UTC](https://discuss.elastic.co/t/is-it-possible-to-build-elasticsearch-range-aggretaion-of-aggregation/258537/2 "2021-01-11T05:35:00Z")

</div>

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