• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Group By and Date Function Hibernate on MySql

 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please have a look at this My Sql table called ipdaily where column LAST_VISIT is a time stamp.



I want to achieve the following .
I want to sum HITS,VOLUME,PAGES grouped by DOMAIN and IP and want the Latest (most recent) time stamp
for the LAST_VIST for each group.

I thought I want to achieve the following sql query.

I tried the following in Hibernate code

Given below are the hibernate obejct mapping

But this doesn't do what I want.

I think I need to use some special sql Criteria. Can anybody tell me exactly what I should do ?
 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did anybody noticed my problem ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic