KPI: group by storage
I need to add an execution that will summarize the number of active accessions by genebank by storage type.
institute.code | storage | count |
---|---|---|
ALB001 | 10 | 300 |
ALB001 | 20 | 310 |
ALB002 | 30 | 30 |
The issue I'm facing is how to make a HQL select that groups by elements of a collection:
select ?, count(acce) from accession a inner join a.acce acce
group by a.institute.code, acce.storage.elements() ??