Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20913

Re: Trying to query last month and have it show each date

$
0
0

I have changed it a bit. I'm now trying to pull the average for every hour of last month and this is what I have. However this only shows me every hour on February 1st. Also if this helps at all I'm doing this in solar winds report writer.

 

 

 

SELECT  Convert(DateTime,Floor(Cast((DateTime) as Float)*24)/24,0) AS SummaryDate,

Nodes.NodeID AS NodeID,

Nodes.Caption AS NodeName,

Interfaces.InterfaceID AS InterfaceID,

Interfaces.Caption AS Interface_Caption,

AVG(InterfaceTraffic.In_Averagebps) AS AVERAGE_of_Average_Receive_bps,

AVG(InterfaceTraffic.Out_Averagebps) AS AVERAGE_of_Average_Transmit_bps

 

 

FROM

(Nodes INNER JOIN Interfaces ON (Nodes.NodeID = Interfaces.NodeID))  INNER JOIN InterfaceTraffic ON (Interfaces.InterfaceID = InterfaceTraffic.InterfaceID AND InterfaceTraffic.NodeID = Nodes.NodeID)

 

 

 

 

WHERE

( DateTime BETWEEN 41669 AND 41669.9999884259 )

AND 

(

  (Interfaces.Caption LIKE '%Eth%') AND

  (Interfaces.Caption LIKE '%CUST:%')

)

 

 

 

 

GROUP BY Convert(DateTime,Floor(Cast((DateTime) as Float)*24)/24,0),

Nodes.NodeID, Nodes.Caption, Interfaces.InterfaceID, Interfaces.Caption

 

 

 

 

ORDER BY SummaryDate ASC

 

 

Thanks for your response!


Viewing all articles
Browse latest Browse all 20913

Trending Articles