HAVING (Azure Stream Analytics)

 

Updated: April 22, 2016

Applies To: Azure

Specifies a search condition for a group or an aggregate. HAVING can be used only with the SELECT expression. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause.

Syntax

[ HAVING <search condition> ]  

<search_condition>

Specifies the search condition for the group or the aggregate to meet.

SELECT TollId, System.Timestamp AS WinEndTime, COUNT(*)   
FROM TollTagEntry TIMESTAMP BY EntryTime  
GROUP BY TumblingWindow( minute , 3 ) , TollId  
HAVING COUNT(*) > 2  
  

Show: