I've been looking in the web for examples on the aggregates like count but it seems all of them are using the aggregate alone.
SELECT field, count(*) FROM table GROUP BY field Should have something like: field.value1, x1 field.value2, x2 ....
I'm looking for a pure JPA answer for this one. If not I guess I can then do further queries just for the count part but that seems unefficient.
Any ideas?