Hey all,
I was wondering if I could turn to the community for some help writing a report. My SQL skills are very limited so I am struggling with the complexity of this. Though I don't think it's TOO complex.
I would like to have a report that would summarize the uptime of the devices in a particular departments by day of the month. For example Feb 02/2010 - 99.87%. Most likely it would be using in a "last month" context. Now, the problem that I am seeing is that because of the "Hourly Statistics Retention" that anything newer than 30 days is showing a percentage for every hour of the day. So to combat that I chose a filter that filters "Hour of Day (24 Hour format) is equal to 0". So I run this and it remedies the issues with the 30 days, but I still have an issue with the "7 Day Detailed Statistics Retention". I was unable to find a filter that would let me get rid of that.
The current SQL query looks like:
SELECT TOP 10000 Convert(DateTime,Floor(Cast((DateTime) as Float)),0) AS SummaryDate,
AVG(ResponseTime.Availability) AS AVERAGE_of_Availability,
ResponseTime.DateTime AS Date
FROM
Nodes INNER JOIN ResponseTime ON (Nodes.NodeID = ResponseTime.NodeID)
WHERE
( DateTime BETWEEN 40208 AND 40231 )
AND
(
(Nodes.Department = 'Telecommunications') AND
(DatePart(Hour,DateTime) = 0)
)
GROUP BY Convert(DateTime,Floor(Cast((DateTime) as Float)),0),
ResponseTime.DateTime
ORDER BY SummaryDate ASC, 3 ASC
Thank you so much in advance.
--adam