SELECT SourceName,
BIT_AND(EventID, 0x3fffffff) as EventID,
EventTypeName,
COUNT(*) As Entries
FROM APPLICATION
GROUP BY SourceName, EventID, EventTypeName
ORDER BY Entries DESC
TimeGenerated is a date & time field from the Event Log (in my case in the form of "d/mm/yyyy hh:mm:ss PM"). Not sure how to restrict the count to TimeGeneated > now()-24 hours or something like that