jpa multiple group by code example Example: jpa criteria query group by multiple columns cq.groupBy(root.get(MyObject_.field1), root.get(MyObject_.field2))