hql按月分组查询 String hql = "select count(*) from RawCaseRecorder where caseEndTime between '"+date1+"' and '"+date2+"' and punish_type_1 in('兽药行政处罚','饲料行政处罚') and caseType=3 group by ";
list = getHibernateTemplate().find(hql);
我想实现按月分组查询,请问大神我该怎么做,group by后面的语句我该怎么写?
急,在线等,求指教!
hql分组查询按月
分享到:
------解决方案-------------------- group by to_char(caseEndTime,'mm') ------解决方案--------------------