Filtering and aggregation
Start with a fixed question
Count denied login events per actor in the half-open UTC window [08:00,08:10). Filter before grouping; count records, not people. The fixture uses minutes since 08:00 UTC on a fictional day and unique event IDs. For example, an event at minute 10 is outside the window, while minute 0 is inside.
Grouping and baselines
For known actors, filter outcome=denied and group by actor. The fixture yields alpha: 3 and beta: 1. A separate denied record has no actor and must be reported as unattributed. The fictional baseline is alpha: 1 and beta: 1 per matching ten-minute window. Differences are +2 and 0, not proof of compromise. A useful baseline compares similar periods, sources and populations.
Join carefully
Join grouped counts to an actor inventory on actor ID. A left join keeps counts even if inventory is missing; an inner join drops unmatched rows. Duplicate inventory keys can multiply joined rows. In this example alpha has a known department and beta has none. Do not equate missing enrichment with a malicious identity. Check key uniqueness before joining.
Thresholds and dashboards
A classroom rule of at least three denied events flags alpha. Use a table with actor, denied count, baseline and source coverage before drawing conclusions. A fixed window can split a burst across its boundary; rolling windows have different cost and deduplication needs. A count of three failed attempts may reflect an ordinary typing error.
Practice with SQLite
Run the offline validator from the archive root. It uses SQLite to check equivalent filters, groups and joins, not native SIEM engines. Change the window end to minute 11 and predict which row becomes eligible. Keep the original fixture unchanged for regression; use a separate copy for experiments.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Filtering and aggregation — knowledge check
Apply SIEM query, aggregation, dialect and debugging principles to fictional scenarios.
Is minute 10 included in [0,10)?
What does count by actor measure here?
Which join preserves unmatched counts?
What risk arises from duplicate inventory keys?
What does +2 over a baseline establish?