sql语句为select * from (select location_id,region_code,county_name,count(region_code) as countKKou from mon_location where longitude !=0.0 and region_code in ('370901') GROUP BY region_code) as teb LEFT JOIN mon_region as r on teb.region_code = r.code ;
求hql语句
其中sql
select location_id,region_code,county_name,count(region_code) as countKKou from mon_location where longitude !=0.0 and region_code in ('370901') GROUP BY region_code
已经转化为select new com.yisa.map.domain.LocationLocation(m.location_id,count(m.region_code) as countKKou,m.region_code,m.county_name) from LocationVo as m where m.longitude !=0.0 and m.region_code in ('370901') GROUP BY m.region_code