I don't know if this will help anyone, but I put this together to give an accurate and easy to read report for Device Interface Usage.
NodeCaption AS [Device Name],
AgentIP AS [Device IP],
CAST(COUNT(CASE WHEN NCM_interfaces.OperStatus = '1' THEN 1 ELSE NULL END) as nvarchar) + '/' + CAST(COUNT(AdminStatus) as nvarchar) AS 'Interfaces In Use'
,CAST(100 * COUNT(CASE WHEN NCM_interfaces.OperStatus = '1' THEN 1 ELSE NULL END) as int) / CAST(COUNT(AdminStatus) as int) AS Interface_Use_Pct
INNER JOIN NCM_Interfaces ON NCM_Interfaces.NodeID=NCM_nodes.NodeID
WHERE NCM_Interfaces.InterfaceType = '6'
GROUP BY NodeCaption, AgentIP
ORDER BY Interface_Use_Pct DESC
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process. Learn more today by joining now.