I have an @ManyToMany relationship between a Question object and a Category object. I want to calculate the number of questions in each category. How can I do it?
select count(question.id), category.description from Category category left join category.questions question group by category.description