How to get the number of alerts in the last 24 hours using SQL

Here’s how to get the number of alerts in the last 24 hours using SQL. Thanks Michael for the question.

 

SELECT COUNT(*) AS [Number of Alerts per Day]
FROM Alert WITH (NOLOCK)
WHERE TimeAdded > dateadd(hh,-24,getutcdate())

 

Hope that helps.

 
Comments

No comments yet.

Leave a Reply