December 8, 2017 at 1:10 pm
I am trying to create columns by a time frame where column a would be from 8am to 10am, column b would be from 10am to 12pm, etc..
This is what I have so far, I would like to create a column using the AS Average_of_Rev_Percent_Utilization, AVERAGE_of_Xmit_Percent_
AVG(Case InBandwidth
AVG(Case InBandwidth
Here is the code that I am using in my query
AVG(Case InBandwidth
When 0 Then 0
Else (In_Averagebps/InBandwidth) * 100
End) AS AVERAGE_of_Recv_Percent_Utilization,
AVG(Case OutBandwidth
When 0 Then 0
Else (Out_Averagebps/OutBandwidth) * 100
End) AS AVERAGE_of_Xmit_Percent_Utilization,
SUM( CASE
WHEN Out_MAXBps/OutBandwidth*100.0 > 90 OR In_MAXBps/InBandwidth*100.0 > 90 THEN 1
ELSE 0
END
) AS COUNT_of_Interface_Caption,
thanks in advance
December 8, 2017 at 1:58 pm
First, based on the code you've posted, data for the 10am hour will duplicated in both time frames you've defined. There was another article posted by Bob Hovious today on this very subject: http://www.sqlservercentral.com/articles/Date+Manipulation/145336/
December 11, 2017 at 5:42 am
Bert-701015 - Friday, December 8, 2017 1:58 PMFirst, based on the code you've posted, data for the 10am hour will duplicated in both time frames you've defined. There was another article posted by Bob Hovious today on this very subject: http://www.sqlservercentral.com/articles/Date+Manipulation/145336/
Thank you I will read over this
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply