select a.au,a.acount,b.bcount,c.ccount from (select name as au,count(aid) as acount from person_info
group by name) a left join
(select name as bu,count(bid) bcount from person_info where to_char(date_created,'yyyy-mm')=to_char(sysdate,'yyyy-mm')
group by name)b on a.au=b.bu left join
(select name as cu,count(cid) ccount from Person_Info where trunc(date_created)=trunc(sysdate)
group by name) c on a.au=c.cu;
报错:
org.hibernate.exception.SQLGrammarException: could not execute query···
····
Caused by: java.sql.SQLException: ORA-00911: 无效字符