Hibernate SQL for HQL
I'm running into some problems when trying to convert a SQL query to 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?
+2
anon
source
to share
1 answer
Some SQL queries cannot be translated directly to HSQL, but it might help: HQL Subqueries in Joins
+3
Maurice perry
source
to share