0 Replies Latest reply on Aug 31, 2015 8:22 AM by Deltona

    Total and Minimum Averages from Average Availability

    Deltona

      --SELECT from Inline View

       

      SELECT AVG(a.AVERAGE_of_Availability) as "Total Average", MIN(a.AVERAGE_of_Availability) as "Minimum Average"

      FROM

      (SELECT  TOP 10000 CONVERT(DateTime,

      LTRIM(MONTH(DateTime)) + '/01/' + LTRIM(YEAR(DateTime)),

      101) AS SummaryMonth, AVG(ResponseTime.Availability) AS AVERAGE_of_Availability

      FROM

      Nodes INNER JOIN ResponseTime ON (Nodes.NodeID = ResponseTime.NodeID)

      WHERE

      DateTime BETWEEN 42184 AND 42214.9999884259

      GROUP BY CONVERT(DateTime, LTRIM(MONTH(DateTime)) + '/01/' + LTRIM(YEAR(DateTime)), 101),

      Nodes.NodeID, Nodes.VendorIcon, Nodes.Caption, Nodes.IP_Address

      ) a