The below-mentioned query is working fine. But I am facing an issue it is not showing 0.
Can anyone change the query if no alert its shows it as 0.
SELECT Count(1) AS CountItems , OAC.DisplayName , CASE WHEN OAC.DisplayName LIKE 'Uplink Interface is down' THEN 'Orange' WHEN OAC.DisplayName LIKE 'Link Receive Utilization above 80%' THEN 'Blue' WHEN OAC.DisplayName LIKE 'Device is down' THEN 'Red' WHEN OAC.DisplayName LIKE 'Server is down' THEN 'Red' WHEN OAC.DisplayName LIKE 'Turnstile is down' THEN 'Red' WHEN OAC.DisplayName LIKE 'Memory Utilization more than 80 %' THEN 'Brown' END AS [Color] FROM Orion.AlertActive OAA JOIN Orion.AlertObjects OAO ON OAO.AlertObjectID = OAA.AlertObjectID JOIN Orion.AlertConfigurations OAC ON OAC.AlertID = OAO.AlertID JOIN Orion.NodesCustomProperties NCP ON NCP.NodeID = OAO.RelatedNodeID WHERE NCP.Stadium_Name LIKE 'Lusail' GROUP BY OAC.DisplayName