We are in process of creating KPI widgets for a modern dashboard using custom SWQL queries.
We have a couple of count queries which are mentioned below:-
1. select Count(Distinct N.CustomProperties.XXXXXX) as Region_Count
FROM Orion.Nodes n where N.CustomProperties.XXXXXX <> ''
2. select count(Distinct Cont.Name) as countgroups from Orion.Container as Cont
join Orion.ContainerMemberSnapshots as Member
ON Cont.ContainerID = Member.ContainerID join Orion.Nodes as node ON Member.EntityID = node.NodeID WHERE ((Cont.DisplayName LIKE '%XXXX%'
OR Cont.DisplayName LIKE '%XXXXXXX%') AND Cont.status = 2)
Separately they are working perfectly fine, but i need help in getting a Numerical value by subtracting Query1 - Query2 with the help of SWQL query itself.
I am not able to find anything related to subtraction of 2 count sub queries.
All the help will be appreciated.
hoping you guys have any inputs