# Elastic Search With JReport

**URL:** <https://discuss.elastic.co/t/elastic-search-with-jreport/96200>\
**Category:** Elasticsearch\
**Created:** [August 8, 2017, 7:15am UTC](https://discuss.elastic.co/t/elastic-search-with-jreport/96200 "2017-08-08T07:15:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaurav\_khandelwal](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@gaurav\_khandelwal](https://discuss.elastic.co/u/gaurav_khandelwal)\
**Post date:** [August 8, 2017, 7:15am UTC](https://discuss.elastic.co/t/elastic-search-with-jreport/96200/1 "2017-08-08T07:15:19Z")

</div>

Hello People,

I am trying to connect Elastic Search with JReport, JReport is a BI tool for analytics.  
I want to do grouping on a particular field and get count of it.  
Below is the SQL counterpart of it,  
SELECT CUSTOMER\_CODE,COUNT(TRANSACTION\_REFERENCE\_NO) FROM AXIA\_REC\_TXNS\_METADATA\_MST GROUP BY CUSTOMER\_CODE ORDER BY 2 DESC.

How can i achieve same in elastic search?

---

<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:** [September 5, 2017, 7:15am UTC](https://discuss.elastic.co/t/elastic-search-with-jreport/96200/2 "2017-09-05T07:15:41Z")

</div>

Closed on September 5, 2017, 7:15am UTC

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