class Books{
private int bookId; //primary key
private String bookName;
Private String category;
}
Consider the above model class(Books) where it has category variable as A,B,C.
It is stored in table - 'books' with column names 'book_id' ,'book_name' , 'category'(category values will be either A or B or C).
Using Hibernate ProjectionList, I would like to have
1.count of book_id(from DB table) with category value as A
2.count of book_id(from DB table) with category value as B
3.count of book_id(from DB table) with category value as C
Assign it to a 3 separate int values countA,countB,countC