下面sql如何改为hql,谢谢! select adusername,count(adusername) as nnum from news_content where uptime >='"+st+"' and uptime <= '"+et+"' group by adusername union select username as adusername,(select count(id) from news_content where uptime >='"+st+"' and uptime <= '"+et+"' and news_content.adusername = news_admin.username) as nnum from news_admin
------解决方案-------------------- 我给你个sample: select * from dual where id = ?1