I am attempting to build Modern Dashboards and using SWQL for the first time. So far I have been able to use SWQL successfully to organize very simple tables. The issue I am currently getting is higher than usual counts when I am using the SELECT COUNT(1) syntax. I only want the total count of devices based on a Custom Property (Owner) and that count to be organized by Status. So, basically how many devices are Up/Down/Critical etc. in a select owner group. Below is the script I am using and the results, which are in the millions, but there are only a few hundred devices for each group.
SELECT COUNT(1) AS Item_Count
, [Nodes] .Status
, [CustomProperties] .Owner
FROM Orion.Nodes AS [Nodes]
, Orion.NodesCustomProperties AS [CustomProperties]
WHERE Owner = 'High Schools'
GROUP BY Status, Owner
OUTPUT: