Number of events collected per day for last 28 days


/*Number of events collected per day for last 28 days.*/
USE OperationsManagerDW
SELECT CONVERT(VARCHAR(10), DateTime, 101) AS Date, COUNT(*) AS Events
FROM  Event.vEvent
WHERE (DateTime BETWEEN DATEADD(day, – 27, GETDATE()) AND GETDATE())
GROUP BY CONVERT(VARCHAR(10), DateTime, 101)
ORDER BY Date DESC

Back to SQL queries main menu


Comments (2)

  1. Anonymous says:

    Hi Mike,

    Since all these queries use OperationsManagerDW, these could be plugged into a report using that existing data source with a fair amount of ease.

    -Jonathan

  2. Mike Hanlon says:

    It sure would be nice to be able to pull this is a report from SCOM or have an excel spreadsheet that would link to the SQL DB and pull the data.