I need to find clients that appear at least 3 minutes in 5 minutes Tumbling window in Azure Stream Analytics.
Below code can find the number of people appear in 5 minutes window.
SELECT
apMac,
COUNT(Distinct([clientMac])) AS [numberofClientsPerFiveMinutes],
AVG(rssi) AS [rssiAverage],
System.TimeStamp AS [EventTimestampUTC],
UDF.melbournetime(System.TimeStamp) AS [EventTimestampLocalTime]
INTO [meraki-aggregated-powerbi]
FROM [ExplodedData]
GROUP BY apMac,
TumblingWindow(Minute, 5)
However, I want to count the people that have been in this list for at least 3 minutes. Using their first appearance and last appearance (base on their query time).
The problem is that I'm not aware of a code style in Stream Analytics