# Getting sum of amount of a phone number greater than 50k for specific month

**URL:** <https://discuss.elastic.co/t/getting-sum-of-amount-of-a-phone-number-greater-than-50k-for-specific-month/153392>\
**Category:** Elasticsearch\
**Created:** [October 22, 2018, 11:49am UTC](https://discuss.elastic.co/t/getting-sum-of-amount-of-a-phone-number-greater-than-50k-for-specific-month/153392 "2018-10-22T11:49:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikhil\_Nambiar](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@Nikhil\_Nambiar](https://discuss.elastic.co/u/Nikhil_Nambiar)\
**Post date:** [October 22, 2018, 11:49am UTC](https://discuss.elastic.co/t/getting-sum-of-amount-of-a-phone-number-greater-than-50k-for-specific-month/153392/1 "2018-10-22T11:49:15Z")

</div>

Hi ,  
This is my mapping  
"mappings":{  
"call\_list":{  
"properties":{  
"phone":{  
"type":"text"  
}  
"pretty":{  
"type":"text"  
}  
"amount":{  
"type":"long"  
}  
"name":{  
"type":"text"  
}  
"uts":{  
"type":"text"  
}

```
			}
		}
	}

```

How to write a query to get sum of amount per phone number between the month passed as search value.

for example  
If I pass 2018 Oct as a search parameter  
I should get output of every phone number in the month of Oct 2018 and its total sum of amount which is within Oct 2018.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 22, 2018, 1:30pm UTC](https://discuss.elastic.co/t/getting-sum-of-amount-of-a-phone-number-greater-than-50k-for-specific-month/153392/2 "2018-10-22T13:30:00Z")

</div>

please do not open duplicates of a thread but answer in the existing one. thanks a lot!

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 22, 2018, 1:30pm UTC](https://discuss.elastic.co/t/getting-sum-of-amount-of-a-phone-number-greater-than-50k-for-specific-month/153392/3 "2018-10-22T13:30:11Z")

</div>


