Courseiva
Detection And ReportinghardMultiple ChoiceObjective-mapped

XDR-Engineer Detection And Reporting Practice Question

An engineer is writing an XQL query to investigate rare process executions. The query needs to calculate the distinct count of endpoints where each process image name was executed, filtering out processes that appeared on more than 50 hosts. Which XQL snippet correctly implements this filter after aggregation?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

stats host_count = count(distinct hostname) by actor_process_image_name | filter host_count <= 50

After using `stats` to aggregate and calculate distinct host counts (e.g., `stats host_count = count(distinct hostname)`), the subsequent `filter` command must be applied to the newly created aggregate field `host_count <= 50`.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • filter host_count <= 50 | stats host_count = count(distinct hostname) by actor_process_image_name

    Why it's wrong here

    Filtering by an aggregated field before the aggregation step causes a syntax error because the field does not yet exist.

  • stats host_count = count(distinct hostname) by actor_process_image_name | filter host_count <= 50

    Why this is correct

    This correctly aggregates distinct hosts per process and then filters the aggregated result using the alias.

  • group by actor_process_image_name having count(distinct hostname) <= 50

    Why it's wrong here

    XQL uses pipeline stages with 'stats' and 'filter', not SQL-style 'having' clauses.

  • stats host_count = count(hostname) where host_count <= 50

    Why it's wrong here

    The 'where' clause cannot evaluate post-aggregation summary variables directly inside the stats function in this manner.

About these practice questions

One of 226 original XDR-Engineer practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Palo Alto Networks exam blueprint

This XDR-Engineer practice question is part of Courseiva's free Palo Alto Networks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XDR-Engineer exam.