# Sum up sort values

**URL:** <https://discuss.elastic.co/t/sum-up-sort-values/166445>\
**Category:** Elasticsearch\
**Created:** [January 30, 2019, 11:18pm UTC](https://discuss.elastic.co/t/sum-up-sort-values/166445 "2019-01-30T23:18:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kendra\_Kuivenhoven](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@Kendra\_Kuivenhoven](https://discuss.elastic.co/u/Kendra_Kuivenhoven)\
**Post date:** [January 30, 2019, 11:18pm UTC](https://discuss.elastic.co/t/sum-up-sort-values/166445/1 "2019-01-30T23:18:18Z")

</div>

Hi all,

I'm using a script query to get the score of "age". I want to run a query where upon completion of the script query, I can sum up the "sort" value.

Here is what I have, how would I write a query to sum up the "sort" values?

 ![sumUp_scores](https://us1.discourse-cdn.com/elastic/original/3X/7/2/72d20db16e24a3a8eb551dd226a3faa0b3a34978.png)

---

<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:** [February 27, 2019, 11:18pm UTC](https://discuss.elastic.co/t/sum-up-sort-values/166445/2 "2019-02-27T23:18:21Z")

</div>

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