I have a code like below:
Pageable pageableRequest = PageRequest.of(page, limit, Sort.by(sortBy));
Page<User> userList= null;
userList = this.user.findAll(pageableRequest)
from here I get all the data and total is shown. However, I want to group the total by status. How can I achieve that? Now total is 26 and I have 3 status inactive, active and vip.