JPA Criteria GROUP BY Clause
The GROUP BY clause is used to collect data from one or more tables and arrange them in a group. In Criteria API, the groupBy() method of AbstractQuery interface is used to filter the records and group them.
Criteria GROUP BY Example
Here, we will perform GROUP BY operations on student table. Let us assume the table contains the following records: -
Now, follow the below steps to perform operations: -