Skip to main content

frequency (Aggregate Function)

Counts the number of occurrences of different values of a given attribute without needing to use GROUP BY {attribute}.

Syntax

<LONG> frequency(<STRING> arg)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
argThe value that needs frequency calculation.STRINGNoYes

Example 1

@info(name = 'query1')
INSERT INTO HeartbeatSecAggPerStream
SELECT contentId AS identifier, frequency(contentId) AS count
FROM TumblingWindow;

This returns the frequency of all the events with given attribute.