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