I am having a @ManyToMany relationship between a Question entity and a Category entity. I want to count the number of questions in each category. How would I do that?
select count(question.id), category.description
from Category category
left join category.questions question
group by category.description
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With