This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Need Help in KPI SWQL query

Hi 

can any one generate SQL query to get % Availability of 7 Days , Last month. Mention query is of Today's Availability.

SELECT Availability, Status, Color FROM
(
SELECT ROUND(AVG( rt.Availability),2)as Availability, 'UP - ' + SubString(tostring(DATETRUNC('day',GETDATE())) ,0,12 ) as Status, '#30b230' As Color
FROM Orion.ResponseTime rt
WHERE rt.node.customproperties.SP_Media='fiber'
AND DATETIME>=ADDDAY(-1,getdate())
AND DATETIME<=getdate()
GROUP BY rt.node.CustomProperties.SP_Media, month(DATETIME)