SPLK-1002 Advanced Searching and Statistics Practice Question
A user wants to find the top 5 sourcetypes by event count over the last 24 hours. Which search is correct?
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
✓
index=* | stats count by sourcetype | sort -count | head 5
Option C correctly uses stats to count events by sourcetype, then sorts in descending order and limits to top 5 with head. Option A contains the invalid command 'eventcount', not a real Splunk command. Option B uses invalid syntax 'top 5 sourcetype'; the correct syntax is 'top limit=5 sourcetype'. Option D returns the top 10 sourcetypes by default, not the top 5.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
index=* | eventcount | top sourcetype
Why it's wrong here
eventcount is not a valid Splunk command.
- ✗
index=* | stats count by sourcetype | top 5 sourcetype
Why it's wrong here
Invalid syntax; top expects a field name, not a number.
- ✓
index=* | stats count by sourcetype | sort -count | head 5
Why this is correct
Correctly counts, sorts descending, and limits to 5.
- ✗
index=* | top sourcetype
Why it's wrong here
Top returns top 10 by default and doesn't guarantee only last 24 hours if time picker is not set.
Go deeper
Related to this question
About these practice questions
This SPLK-1002 question is part of Courseiva's 475-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.