HQL renvoie un nouvel objet de la requête
return em.createQuery("select new YourClass(yourTable.yourValue, sum(yourTable.yourValueButSum)) from YourTable yourTable " +
"where yourTable.yourValue = :value" +
" group by yourTable.yourGroup" +
" order by yourTable.yourValue desc",
Yourclass.class).setParameter("value", value);
Zwazel