SELECT count(d.*)
FROM (
SELECT s.id
,avg(e.marks)
FROM Student s
INNER JOIN Exam e ON s.id = e.student_id
GROUP BY s.id
) d
How to represent this for JPA Criteria query to get no of records
SELECT count(d.*)
FROM (
SELECT s.id
,avg(e.marks)
FROM Student s
INNER JOIN Exam e ON s.id = e.student_id
GROUP BY s.id
) d
How to represent this for JPA Criteria query to get no of records
Looks this is not possible in Criteria Query going ahead with Database view for same