(1)这个是要irprot做出来的样式。
(2)
第(2)张图是我研究出的。在irprot上又不能改。
(3)这个是sql得到的数据。
select k.fattype fattype,k.FATMINITYPE fatminitype,count(accidentid) minicount from (
select v.accidentid accidentid,v.fatname fatminitype,tf.fatname fattype from
(select a.accidentid,a.FATTYPE FATTYPE,a.FATMINITYPE,b.fatname from elev_accident a,ELEV_FAULTTYPE b where
a.FATMINITYPE = b.fatid and a.isdel=0 and a.ACCIDENTSTATUS!=7 order by a.fattype,a.fatminitype ) v
,ELEV_FAULTTYPE tf where v.fattype = tf.fatid
) k group by k.fattype,k.FATMINITYPE order by fattype
这个sql