java - How to use group by with sum in criteria -


i have 3 columns in table id, uid , value. want sum values of each uid. know query want use criteria.

query:

 select uid,sum(value) post group uid; 

how can use in hibernate criteria?

for example:

select uid,sum(value) post group uid having sum(value) > 100; 

Comments