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);
Code Example |
---|
Java :: |
:: java ee service formparam optional |
:: |
:: |
:: |
:: dialog box in java swing |
:: |
Java :: |
:: java initialize map with values in one line |
:: |
:: |
Java :: |
Java :: linear layout background color |
:: |
:: |
:: |
:: |
:: |
:: |
Java :: add value with n variable with Arraylist in java |
:: |
Java :: |
:: |
:: how to iterate hashset in java 8 |
Java :: |
:: |
:: |
:: |
:: |
Java :: |