# SUM top hit aggegration?

**URL:** https://discuss.elastic.co/t/sum-top-hit-aggegration/154383
**Category:** Elasticsearch
**Created:** [October 29, 2018, 6:26am UTC](https://discuss.elastic.co/t/sum-top-hit-aggegration/154383 "2018-10-29T06:26:14Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![gbrown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gbrown/32/34482_2.png) [@gbrown](https://discuss.elastic.co/u/gbrown)
#### Post date: [October 29, 2018, 3:58pm UTC](https://discuss.elastic.co/t/sum-top-hit-aggegration/154383/3 "2018-10-29T15:58:40Z")

</div>

This question sounds very similar to [one I recently answered](https://discuss.elastic.co/t/how-to-sum-the-results-of-multiple-buckets/153438) - the answer there about how to solve this using scripted aggregations may be useful to you, although it sounds like you may have to add a date histogram aggregation into the mix as well.

---

_[View the full topic](https://discuss.elastic.co/t/sum-top-hit-aggegration/154383)._
