Where do aggregations take place Grafana or Druid?

Hi guys

I am new to Grafana.

We have Druid as the datasource to Grafana. When I want the count or when I use the Group by clase in the query filer in Grafana, will the computation take place on Druid and the results are sent to Grafana or is the data queried and the aggregation/ computation takes place on Grafana?

Thanks in advance