I need a help for similar query to use Spring JPA Custom query (JPQL) to fetch the multiple count results in single query as shown below.Below query framed in Mysql.
SELECT (SELECT COUNT(*) FROM quiz WHERE percentage is not null) as TotalCount,
(SELECT COUNT(*) FROM quiz WHERE percentage is not null and percentage < 75) as LowerCount
Below are the results
TotalCount, LowerCount
'57', '35'