SPLK-1002 Advanced Searching and Statistics Practice Question
Which TWO of the following statements about the 'stats' command are true?
⚠ Common exam trap
Splunk often tests the misconception that 'stats' works like 'eval' or 'rex' to modify raw events, or that count() always requires a field, when in fact count() without a field is a valid and common usage.
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
✓
It can be used with a BY clause to group results.
The 'stats' command in Splunk supports a BY clause that allows you to group results by one or more fields, similar to a SQL GROUP BY. This enables you to compute aggregate statistics (e.g., count, sum, avg) for each distinct value of the specified field(s), which is a core feature for summarizing event data.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
It can be used with a BY clause to group results.
Why this is correct
The BY clause allows grouping by one or more fields.
- ✗
The count() function must always include a field argument.
Why it's wrong here
count() can be used without a field to count events.
- ✗
It creates one event per input event by default.
Why it's wrong here
stats aggregates events, reducing them to one row per group (or overall).
- ✗
It can be used to modify individual field values in raw events.
Why it's wrong here
stats does not modify raw events; it produces statistical summaries.
- ✓
It can produce multiple output columns by using multiple stats functions.
Why this is correct
Multiple functions can be used in a single stats command, e.g., stats count, avg(bytes).
Go deeper
Related to this question
About these practice questions
One of 475 original SPLK-1002 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SPLK-1002 practice question is part of Courseiva's free Splunk 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 SPLK-1002 exam.