Hello,
I am trying to combine the data from two interfaces before keeping the lowest 95%, then getting the max out of that. This would be a mathematically sound way of getting the combined 95th percentile. I am at the step where I want to display the data in the same table before combining it. These are two interfaces on the same node. The polling interval is the same, so the polling DateTime do match.
Here's the code I have produced. It does not work. What am I missing?
DECLARE @StartDate DateTime DECLARE @EndDate DateTime SET @StartDate = ${FromTime} SET @EndDate = ${ToTime} SELECT a.DateTime as DateTime, a.In_AveragebpsNNI1 AS In_AveragebpsNNI1, b.In_AveragebpsNNI2 AS In_AveragebpsNNI2 FROM (SELECT DateTime, In_Averagebps AS In_AveragebpsNNI1 FROM InterfaceTraffic WHERE InterfaceTraffic.InterfaceID = '1265' AND DateTime >= @StartDate AND DateTime <= @EndDate ORDER BY DateTime ASC) AS a INNER JOIN (SELECT DateTime, In_Averagebps AS In_AveragebpsNNI2 FROM InterfaceTraffic WHERE InterfaceTraffic.InterfaceID = '1266' AND DateTime >= @StartDate AND DateTime <= @EndDate ORDER BY DateTime ASC) AS b ON a.DateTime = b.DateTime
Regards,