# Group By Elk Stack?

**URL:** <https://discuss.elastic.co/t/group-by-elk-stack/253543>\
**Category:** Kibana\
**Created:** [October 28, 2020, 10:07am UTC](https://discuss.elastic.co/t/group-by-elk-stack/253543 "2020-10-28T10:07:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![juuuhuuu](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@juuuhuuu](https://discuss.elastic.co/u/juuuhuuu)\
**Post date:** [October 28, 2020, 10:07am UTC](https://discuss.elastic.co/t/group-by-elk-stack/253543/1 "2020-10-28T10:07:48Z")

</div>

Hello Community,

we are using elk Stack. I was wondering where is the best way to use aggregation- in Logstash or in elasticsearch? Or is it possible do it this in Kibana ?

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [October 29, 2020, 9:22pm UTC](https://discuss.elastic.co/t/group-by-elk-stack/253543/2 "2020-10-29T21:22:22Z")

</div>

Hello,

So Kibana lets you perform aggregations in elasticsearch by sending your aggregation requests. Logstash is for ingesting the data.

Did you mean a particular aggregation?

Our docs here should help - [https://www.elastic.co/guide/index.html](https://www.elastic.co/guide/index.html)  
[https://www.elastic.co/videos/](https://www.elastic.co/videos/)

Thanks  
Bhavya

---

<div class="post-metadata">

**Author:** ![juuuhuuu](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@juuuhuuu](https://discuss.elastic.co/u/juuuhuuu)\
**Post date:** [October 30, 2020, 10:37am UTC](https://discuss.elastic.co/t/group-by-elk-stack/253543/3 "2020-10-30T10:37:49Z")

</div>

Hi Thank you for replay.

my goal is :

```
SELECT COUNT(CustomerID), Country
FROM Customers
GROUP BY Country;

```

that I can filter like how many same countries have the same log.

---

<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:** [November 27, 2020, 10:37am UTC](https://discuss.elastic.co/t/group-by-elk-stack/253543/4 "2020-11-27T10:37:59Z")

</div>

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