Skip to content

Commit d2ad6a3

Browse files
authored
Use rendered description instead of raw description 🍡
1 parent bde9bf6 commit d2ad6a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SQL Queries/Data Warehouse/DW_Events_ByTotalEvents.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
--
1212
-- Author: Blake Drumm ([email protected])
1313
-- Date Created: May 7th, 2024
14+
-- Date Modified: May 8th, 2024
1415
-- Original query: https://kevinholman.com/2016/11/11/scom-sql-queries/#:~:text=Events%20Section%20(Warehouse)
1516
----------------------------------------------------------------------------------------------------------------
1617
-- Selects the top 100 records from the result set
1718
SELECT TOP 100
1819
evt.EventDisplayNumber, -- Display number of the event
19-
evtd.RawDescription, -- Raw description of the event
20+
evtd.RenderedDescription, -- Raw description of the event
2021
evtlc.ComputerName, -- Name of the computer logging the event
2122
COUNT(*) AS TotalEvents, -- Total number of events aggregated by display number, description, and computer name
2223
DATEDIFF(DAY, MIN(evt.DateTime), MAX(evt.DateTime)) + 1 AS DaysOfData -- Calculates the span of days between the earliest and latest event dates for each group
@@ -30,7 +31,7 @@ INNER JOIN
3031
ON evt.LoggingComputerRowId = evtlc.EventLoggingComputerRowId
3132
GROUP BY
3233
evt.EventDisplayNumber, -- Groups the results by event display number,
33-
evtd.RawDescription, -- raw event description,
34+
evtd.RenderedDescription, -- raw event description,
3435
evtlc.ComputerName -- and computer name
3536
ORDER BY
3637
TotalEvents DESC -- Orders the results by the total number of events, in descending order

0 commit comments

Comments
 (0)