group by query in elasticsearch code example Example: Elasticsearch for group by like in sql select *, count(*) from schools group by schools