The GroupBy function is one of the most commonly used in Anodot. Most often, it is used to aggregate multiple metrics by summing them, or averaging them across one or more properties. However, other aggregation methods are available as well.
For example, aggregating metric by Count will sum the number of all metrics reported for any given time scale.
The difference between Count and Sum is explained below:
A gaming company track the number of user clicks for different web games it offers:
What: # of clicks
Properties: game, device_type, OS
At a specific time (e.g., 16:00), the following metrics have been registered in Anodot:
- Metric A - Animals_puzzle, mobile, Android: 50 clicks
- Metric B - Princess_puzzle, mobile, Android: 20 clicks
- Metric C - Magic_puzzle, mobile, Android: 130 clicks
GroupBy(Sum, device_type,OS) - sums all clicks that include mobile, Android = 200 (50+20+130)
- Use case: Detect a drop in clicks in specific device\OS.
GroupBy(Count, device_type,OS) - counts all metrics that include mobile, Android = 3 (A+B+C)
- Use case: Detect anomaly in the number of active games.