Hi,
Hibernate version: 2.1.4
Name and version of the database you are using: Oracle 9i
I have the following query:
Code:
select o.customer.name, o.orderDate, count(*)
from Order o
group by o.customer.name, o.orderDate
I need to group by date (o.orderDate), but the orderDate is a Calendar.
Code:
Result:
customer name orderDate qty
----------------- --------------------- ------------
TTT Tecnologies 10/05/2004 12:20:03 1
TTT Tecnologies 10/05/2004 14:30:40 1
TTT Tecnologies 10/05/2004 16:22:01 1
TTT Tecnologies 10/05/2004 18:00:02 1
TTT Tecnologies 11/05/2004 10:15:02 1
TTT Tecnologies 11/05/2004 12:18:40 1
The correct is:
customer name orderDate qty
----------------- --------------------- ------------
TTT Tecnologies 10/05/2004 3
TTT Tecnologies 11/05/2004 2
I have the count for Day.
How can I do this in the HQL?
thanks!!!