Trying to pull Top 10 Applications in a report format for our site routers.
For this post, I am only testing 2 routers. The report works fine with just one site
router listed, however, I'd like to have them grouped by site and not by application.
Can someone please look over for me and tell me where/what I need to do different?

SELECT TOP 10
NetflowApplicationSummary.AppName AS Application_Name,
NetflowApplicationSummary.Port AS Port_Number,
Nodes.Caption AS NodeName,
SUM(NetflowApplicationSummary.TotalBytes) AS SUM_of_Bytes_Transferred
FROM
NetflowApplicationSummary INNER JOIN Nodes ON (NetflowApplicationSummary.NodeID = Nodes.NodeID)
WHERE
( DateTime BETWEEN 39847 AND 39854.5833333333)
AND
(
(Nodes.NodeID = 27) OR
(Nodes.NodeID = 22)
)
GROUP BY NetflowApplicationSummary.AppName, NetflowApplicationSummary.Port,Nodes.Caption,
ORDER BY 4 DESC