📅  最后修改于: 2022-03-11 14:52:05.132000             🧑  作者: Mango
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);