Hello Friends,
I have working SWQL query which gets last month data with by manually feeding the date, I need help to alter the query to pick last month data automatically so that i can avoid changing the query every month.
I tried multiple queries but they are failing, not sure which function to use to get that data.
Here is my query. This query gives the average value of all the nodes for last month. Need help only on the date part on this query. Thanks in Advance
SELECT
ROUND(AVG(Availability), 2) as AvailabilityAverage
FROM
Orion.ResponseTime as rt
JOIN
Orion.Nodes as n
ON rt.nodeid = n.nodeid
WHERE
n.customproperties.segmentation = 'Network'
AND rt.DateTime >= '2024-08-1'
AND rt.DateTime < '2024-09-1'