Hey everyone,
Trying to create a report for a selected types of nodes where it will show count of interface with status against each device
Please optimize the below query
select n.nodeid, n.Caption as NodeName, i.InterfaceName, i.Status from orion.nodes n inner join orion.npm.interfaces i on n.nodeid = i.nodeid where nodename like '%Cisco%' .status, COUNT (CASE Status WHEN '1' THEN 1 else NULL end) AS UP, COUNT (CASE Status WHEN '2' THEN 1 else NULL end) AS DOWN
Thanks