Courseiva
Advanced Searching and StatisticseasyMultiple SelectObjective-mapped

SPLK-1002 Advanced Searching and Statistics Practice Question

Which THREE of the following are valid Splunk search commands for determining the number of distinct values of a field?

⚠ Common exam trap

A common mix-up: candidates confuse `count(field)` with `dc(field)`, not realizing that `count` tallies events while `dc` tallies unique values, and that `distinct_count` is not a valid Splunk command.

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 dc(field)

`| stats dc(field)` uses the `dc` (distinct count) function to return the exact number of unique values for the specified field. This is the direct and most efficient command for counting distinct values in Splunk.

Answer analysis

Option-by-option breakdown

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

  • | stats count(field)

    Why it's wrong here

    count(field) counts non-null values, not distinct.

  • | stats dc(field)

    Why this is correct

    dc() is a stats function that returns distinct count.

  • | stats distinct_count(field)

    Why it's wrong here

    distinct_count is not a valid function; dc() is used.

  • | stats values(field)

    Why this is correct

    values() returns a multivalue field of distinct values.

  • | dedup field | stats count

    Why this is correct

    dedup removes duplicates, then count gives number of distinct values.

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 →

How Courseiva writes practice questions · Editorial policy

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.