# Stats combination

**URL:** <https://discuss.elastic.co/t/stats-combination/17532>\
**Category:** Elasticsearch\
**Created:** [May 15, 2014, 11:17am UTC](https://discuss.elastic.co/t/stats-combination/17532 "2014-05-15T11:17:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oz\_shelach](https://avatars.discourse-cdn.com/v4/letter/o/a9a28c/32.png) [@oz\_shelach](https://discuss.elastic.co/u/oz_shelach)\
**Post date:** [May 15, 2014, 11:17am UTC](https://discuss.elastic.co/t/stats-combination/17532/1 "2014-05-15T11:17:26Z")

</div>

I'd like to calculate the relation between the stats of some fields. For  
example, the average revenue per rental day would be the total of NET  
divided by the total of DURATION. Is this an answer ES can give me  
directly, or must send two queries and do my own manipulation of the  
responses ?

I've read and re-read the documentation for various facets, which seems to  
be the place to look. Perhaps I'm missing the correct place to look, or the  
appropriate example...

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b0a8438d-8a4f-4fca-ab04-309c83af046b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b0a8438d-8a4f-4fca-ab04-309c83af046b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:29am UTC](https://discuss.elastic.co/t/stats-combination/17532/2 "2017-07-06T01:29:11Z")

</div>


