with qa as (SELECTa.PURDEPTID,b.DEPTNAME,round(COUNT(CASE a.STATUS WHEN '70' THEN '70' ELSE NULL END)/count(a.STATUS),2) count1,'进度值' as f1 FROM PUR_CAIGOUYUBAOCX a LEFT JOIN BD_DEPT b on a.PURDEPTID = b.DEPTIDwhere a.STATUS in ('60','70') and to_char(to_date(a.CREATEDATE,'yyyy-mm-dd hh24:mi:ss'),'dd') = to_char(to_date(sysdate,'yyyy-mm-dd hh24:mi:ss'),'dd')GROUP BY b.DEPTNAME,a.PURDEPTIDorder by a.PURDEPTID)SELECT * from qa