An analyst writes an XQL query to aggregate alert counts by severity and action, but the query returns a parsing syntax error.
dataset = xdr_data | filter causality_actor_process_image_name != null | comp count() by causality_actor_process_image_name
What is the correct XQL syntax correction needed to successfully execute this aggregation?
Trap 1: Remove the causality filter entirely because null checks are…
Null checks (`!= null`) are fully supported and frequently used in XQL filtering.
Trap 2: Change 'xdr_data' to 'panw_alerts' and use 'aggregate' instead of…
'aggregate' is not the primary aggregation verb in XQL; 'stats' is standard.
Trap 3: Replace 'filter' with 'where' and remove the dataset declaration.
'filter' is a valid XQL command, and specifying the dataset is mandatory in XQL.
- A
Remove the causality filter entirely because null checks are unsupported in XQL.
Why it fails: Null checks (`!= null`) are fully supported and frequently used in XQL filtering.
- B
Change 'xdr_data' to 'panw_alerts' and use 'aggregate' instead of 'comp'.
Why it fails: 'aggregate' is not the primary aggregation verb in XQL; 'stats' is standard.
- C
Replace 'filter' with 'where' and remove the dataset declaration.
Why it fails: 'filter' is a valid XQL command, and specifying the dataset is mandatory in XQL.
- D
Replace 'comp count()' with 'stats count()'
`stats` is the aggregation stage XQL recognises; `comp` is not a valid stage keyword, so the parser fails. Substituting `stats count()` satisfies the aggregation requirement, grouping alert counts by `causality_actor_process_image_name` and returning results without a syntax error.