SUM top hit aggegration?

This question sounds very similar to one I recently answered - 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.

1 Like