How to order records by a computed column in Criteria API?
- by bilalsalih
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