# Percent of users having 1, 2, 3, 4, 5+ orders

**URL:** <https://discuss.elastic.co/t/percent-of-users-having-1-2-3-4-5-orders/138013>\
**Category:** Elasticsearch\
**Created:** [June 29, 2018, 5:09pm UTC](https://discuss.elastic.co/t/percent-of-users-having-1-2-3-4-5-orders/138013 "2018-06-29T17:09:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Virgile\_Vivier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/virgile_vivier/32/32830_2.png) [@Virgile\_Vivier](https://discuss.elastic.co/u/Virgile_Vivier)\
**Post date:** [June 29, 2018, 5:09pm UTC](https://discuss.elastic.co/t/percent-of-users-having-1-2-3-4-5-orders/138013/1 "2018-06-29T17:09:33Z")

</div>

Hi all,

I use Elasticsearch 5.5.

Like said in subject, I'm looking to know how many percent of users have 1, 2, 3, 4, 5+ orders.

Example:

50% of users having 1 order  
10% of users having 2 orders  
10% of users having 3 orders  
10% of users having 4 orders  
10% of users having 5 or more orders

It makes me crazy I try to combine aggregation to make it work but I didn't find the solution.

Thanks!

---

<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:** [July 27, 2018, 5:09pm UTC](https://discuss.elastic.co/t/percent-of-users-having-1-2-3-4-5-orders/138013/2 "2018-07-27T17:09:33Z")

</div>

Closed on July 27, 2018, 5:09pm UTC

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