During a join I get the following Table (example):
+----------+----------+
| Hostname | Severity |
+----------+----------+
| host1 | high |
| host2 | medium |
| host1 | high |
| host2 | low |
| host1 | low |
| host2 | low |
| host1 | low |
| host2 | high |
| host1 | high |
| host2 | high |
+----------+----------+
Is it possible to create I JPQL query where I get the following result:
+----------+------+--------+-----+
| Hostname | high | medium | low |
+----------+------+--------+-----+
| host1 | 3 | 0 | 2 |
| host2 | 2 | 1 | 2 |
+----------+------+--------+-----+
I tried with COUNT and GROUP BY but I got something like that:
host1,high,3
host1,medium,0
host1,low,2
etc...
BR, Rene