I need some help with a SWQL query. Right now, I'm running a query to return a count of devcies that have 100% availability over the last 31 days with this query and this is working great:
"SELECT COUNT(*) AS [100% Available] FROM (SELECT [Nodes].Caption , AVG([Nodes].ResponseTimeHistory.Availability) AS [Availability] FROM Orion.Nodes AS [Nodes] WHERE [Nodes].NodeName LIKE '%WTNC%' AND [Nodes].ResponseTimeHistory.DateTime BETWEEN GETDATE() - 31 AND GETDATE() GROUP BY [Nodes].Caption HAVING AVG([Nodes].ResponseTimeHistory.Availability) = 100)"
But I need to create two other queries and don't know exactly how to do it in SWQL language.
The two queries I want are:
1. A query that will just look at the business day's - So Monday thru Friday from 8am to 5pm.
2. A query that will look at every day, but exclude Sunday's from Midnight to 6am (our maintenance window)
Can anyone assist with this?
Thanks.