How to order records by a computed column in Criteria API?
Posted
by bilalsalih
on Stack Overflow
See other posts from Stack Overflow
or by bilalsalih
Published on 2010-04-01T11:05:02Z
Indexed on
2010/04/01
11:53 UTC
Read the original article
Hit count: 286
How can I write the below HQL query using the Criteria API?
select s.Name, sum(q.PointsObtained), sum(q.TotalPoints)
from Student s join s.Quizzes
order by sum(q.PointsObtained) / sum(q.TotalPoints) desc
© Stack Overflow or respective owner