I want to convert this query to HQL syntax please:
SELECT count(*) from ( SELECT count(name) as tot FROM myTable WHERE id = 1 GROUP BY name ) as src;
UPDATE
I found a way to do it : based on Count the number of groups in HQL Query?
this query SELECT count(name) as tot FROM myTable WHERE id = 1 GROUP BY name
return me a List and then i do a .size()
. it works for me !