Skip to content

Commit

Permalink
Add computer name to output ✅
Browse files Browse the repository at this point in the history
  • Loading branch information
blakedrumm committed May 7, 2024
1 parent 8fce171 commit b171eb9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions SQL Queries/Data Warehouse/DW_Events_ByNumber.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--Most common events by event number and raw event description (this will take a very long time to run but it shows us not only event ID – but a description of the event to help understand which MP is the generating the noise)
SELECT top 100 EventDisplayNumber, Rawdescription, COUNT(*) AS TotalEvents
--Most common events by event number and raw event description and computer name (this will take a very long time to run but it shows us not only event ID – but a description of the event to help understand which MP is the generating the noise)
SELECT top 100 evt.EventDisplayNumber, evtd.RawDescription, evtlc.ComputerName, COUNT(*) AS TotalEvents
FROM Event.vEvent evt
inner join Event.vEventDetail evtd on evt.eventoriginid = evtd.eventoriginid
GROUP BY EventDisplayNumber, Rawdescription
inner join vEventLoggingComputer evtlc on evt.LoggingComputerRowId = evtlc.EventLoggingComputerRowId
GROUP BY evt.EventDisplayNumber, evtd.RawDescription, evtlc.ComputerName
ORDER BY TotalEvents DESC

0 comments on commit b171eb9

Please sign in to comment.