Trying to script JPQL like in SQL, when you can have a Select … from (Select …)
but seems that this is impossible with JPQL.
Is there any other way to do something like that?
Or it’s possible to group by [calculation logic], like :
group by case when … end, e.colum2,…