This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

DOWNSAMPLE Function causing Divide by zero errors

My goal is to create a SWQL query to pull the # of clients over time and I keep getting divide by zero errors. After doing some troubleshooting, it turns out DOWNSAMPLE is causing the errors. Here's the SWQL query I was using:

SELECT
  DOWNSAMPLE(HAP.ObservationTimestamp) AS time,
  SUM(HAP.Clients) AS Clients
FROM Orion.Packages.Wireless.HistoricalAccessPoints HAP
WHERE HAP.ObservationTimestamp BETWEEN '2021-01-27T16:51:45.447Z' AND '2021-01-29T16:51:45.447Z'
GROUP BY HAP.ObservationTimestamp
ORDER BY HAP.ObservationTimestamp ASC;

Here's an example of the output after removing DOWNSAMPLE function:

2021-01-27 11:54:59.030
2021-01-27 11:55:01.030
2021-01-27 11:55:01.060
2021-01-27 11:55:03.3270
2021-01-27 11:55:03.420
2021-01-27 11:55:03.5130
2021-01-27 11:55:03.9671
2021-01-27 11:55:050
2021-01-27 11:55:05.060
2021-01-27 11:55:05.1070
2021-01-27 11:55:05.3430
2021-01-27 11:55:05.5170
2021-01-27 11:55:06.0930
2021-01-27 11:55:06.3730
2021-01-27 11:55:07.580

I noticed that on 2021-01-27 11:55:05, it doesn't have the .### value in the timestamp. Could this be the issue that's causing DOWNSAMPLE to throw divide by zero errors? Is this a potential bug?

I was going to submit an issue via Github but it wouldn't let me due to not making any contributions to the Orion SDK... Any suggestions on what I should to in the meaning time?