The out-of-the-box has it by node, but I needed a summary by sensor

SELECT
concat(count(*),' Sensors') as [Total]
,isNULL(sum(case when status=1 then 1 end),0) as [Up]
,'/Orion/HardWareHealth/Images/Server_Small_Up.png' as [_IconFor_Up]
,isNULL(sum(case when status=2 then 1 end),0) as [Down]
,'/Orion/HardWareHealth/Images/Server_Small_Down.png' as [_IconFor_Down]
,isNULL(sum(case when status=3 then 1 end),0) as [Warning]
,'/Orion/HardWareHealth/Images/Server_Small_Warning.png' as [_IconFor_Warning]
,isNULL(sum(case when status=14 then 1 end),0) as [Critical]
,'/Orion/HardWareHealth/Images/Server_Small_Critical.png' as [_IconFor_Critical]
,isNULL(sum(case when status=27 then 1 end),0) as [Unknown]
,'/Orion/HardWareHealth/Images/Server_Small_Unknown.png' as [_IconFor_Unknown]
FROM Orion.HardwareHealth.HardwareItem
Thank you,
Amit
Loop1 Systems