I'm stuck trying to get a query (QueryDSL) for a job that gives me a number of different categories. For example, what am I trying to achieve:
categoryA -> 10 entries categoryB -> 20 entries
This is what I still have:
query().from(application) .transform(groupBy(application.category).as(list(application)));
However, this gives me a list of all entire entries for each category, I just want to get a count of this.
I tried messing around with count() but no luck.
Does anyone know how to do this?
source share