Courseiva
Using Fields and LookupseasyMultiple ChoiceObjective-mapped

SPLK-1001 Using Fields and Lookups Practice Question

A security analyst wants to count the number of unique users who have logged in over the past week. Which field-based command should they use?

⚠ Common exam trap

Watch out — candidates often confuse `stats count by user` (which groups by user) with counting unique users, or they incorrectly use `sum` on non-numeric fields, leading them to choose options that do not produce a single unique count.

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=main sourcetype=login | dedup user | stats count

It first uses `dedup user` to remove duplicate user values, leaving only unique users, and then `stats count` to count the remaining events, which effectively counts the number of unique users who logged in over the past week. This approach ensures each user is counted only once, meeting the requirement for a unique count.

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=main sourcetype=login | stats sum(user)

    Why it's wrong here

    Sum is not valid for string fields; it's for numeric fields.

  • index=main sourcetype=login | dedup user | stats count

    Why this is correct

    Dedup removes duplicate users, then stats count gives the number of unique users.

  • index=main sourcetype=login | stats count by user

    Why it's wrong here

    Stats count by user gives event counts per user, not a single unique user count.

  • index=main sourcetype=login | top user

    Why it's wrong here

    Top shows top values with counts, not a single count of unique users.

About these practice questions

One of 502 original SPLK-1001 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-1001 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-1001 exam.