I am trying to do something that is easy, like a pie in PHP and Co: SELECT COUNT (x) as numItems, AVG (y) on average, ... FROM Z
In PHP, I would get a simple array, for example [{numItems: 0, average: 0}], which I could use as follows:
echo "Number of Items: " . $result[0]['numItems'];
Typically, in JPQL, you query only individual objects or individual columns and get list types, such as List<SomeEntity>or List<Long>. But what do you get when you request multiple columns?
source
share