Im running into some problems when trying to convert a SQL query into HQL (or Criteria/Restriction). I have the following SQL query:
Select count(n), CreatedDate from (
Select count(serverId) as n, Date(Created) as CreatedDate
from mytable
group by Date(Created), serverId
) as tbl
group by CreatedDate;
So what is the HQL (or Criteria) equivalent?