 <p>You can get min and max per user , then the rest you need to do from the client side - </p> <pre><code>{ "aggs": { "users": { "terms": { "field": "Name" }, "aggs": { "maxAge": { "max": { "field": "age" } }, "minAge": { "min": { "field": "age" } } } } } } </code></pre> <p>Here , you need to make a bucket per name using <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html" rel="nofollow">terms aggregation</a>. Per bucket , you need to get max and min value using max and min aggregation.</p> <p>Rest you need to take care on the client side.</p>