--B.三个月按90天算select EQID,EQNAME from EQUIPMENTS where datediff(day,CURMTDATE,getdate())>90--Eselect DEPT,count(设备编号) 设备数量 from EQIUPMENTS where STATUS='故障' group by DEPT