SELECT PayloadFilterID,SourceIP, DestinationIP, Action, Severity, COUNT(1) from dbo.payloadlogs WHERE (payloadlogs.LogDate >= '2015-02-01 00:00:00.0' AND payloadlogs.LogDate < '2015-03-01 00:00:00.0') GROUP BY PayloadFilterID, SourceIP, DestinationIP, Action ORDER BY COUNT(1) DESC
The above SQL script is very close to what I needed but it's missing one more column/field,
ie payloadfilter2s.Name found in the script below:
SELECT payloadlogs.PayloadLogID, payloadlogs.PayloadFilterID, payloadlogs.SourceIP, payloadlogs.DestinationIP, payloadlogs.action, payloadlogs.Severity, payloadfilter2s.PayloadFilter2ID, payloadfilter2s.TBUID, payloadfilter2s.Name FROM payloadlogs, payloadfilter2s WHERE payloadlogs.PayloadFilterID = payloadfilter2s.PayloadFilter2ID order by payloadlogs.PayloadLogID
I kept getting some sort of syntax error if I attempts to insert
"GROUP BY payloadfilter2s.Name, SourceIP, DestinationIP, payloadlogs.action ORDER BY COUNT(1) DESC"
into the 2nd SQL (which if successfully implemented in the 2nd SQL will closely meet my requirements)
Let me know any further inputs/info needed from me to implement requirements indicated above