Question 493 of 500
Advanced Searching and StatisticsmediumMultiple ChoiceObjective-mapped

Quick Answer

The correct change is to replace `stats count by uri, method` with `stats count by uri`. This is because the original search groups results by both the uri and method fields, creating separate count rows for each unique combination, which is why the analyst saw only five rows of URI-method pairs rather than the top five URIs overall. By removing the method field from the `by` clause, the stats command aggregates counts solely by URI, collapsing all methods under each URI into a single total. On the Splunk SPLK-1003 exam, this question tests your understanding of how the `stats ... by` clause handles multiple fields—a common trap is forgetting that each additional field in the `by` clause creates more granular groupings, not broader ones. A useful memory tip: think of the `by` fields as the “grouping keys”—fewer keys mean broader buckets, so if you want totals per URI alone, keep only the URI field.

SPLK-1003 Advanced Searching and Statistics Practice Question

This SPLK-1003 practice question tests your understanding of advanced searching and statistics. Examine the command output carefully: the correct answer depends on what the output actually shows, not on general recall alone. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Exhibit

Refer to the exhibit.
```
index=web sourcetype=access_combined
| rex "(?<ip>\d+\.\d+\.\d+\.\d+) (?<method>\w+) (?<uri>[^ ]+)"
| stats count by uri, method
| sort - count
| head 5
```

The exhibit shows a search to find the top 5 URI-method combinations by count. However, the results show only 5 rows, but the analyst expected to see the top 5 URIs overall, not combinations. Which change to the search would achieve the desired result?

Question 1mediummultiple choice
Read the full NAT/PAT explanation →

Exhibit

Refer to the exhibit.
```
index=web sourcetype=access_combined
| rex "(?<ip>\d+\.\d+\.\d+\.\d+) (?<method>\w+) (?<uri>[^ ]+)"
| stats count by uri, method
| sort - count
| head 5
```

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

Change `stats count by uri, method` to `stats count by uri`.

Option E is correct because the original search uses `stats count by uri, method`, which groups results by both URI and method, producing separate counts for each combination. Changing it to `stats count by uri` removes the method field from the grouping, so the count is aggregated per URI alone, giving the top 5 URIs overall as the analyst expected.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Add `| where method="GET"` before stats.

    Why it's wrong here

    Filters to GET only, not overall top URIs.

  • Replace `stats` with `chart count over uri by method`.

    Why it's wrong here

    Chart would create a table with methods as columns, not a simple top 5 list.

  • Use `top limit=5 uri, method` instead.

    Why it's wrong here

    Top with two fields still shows combinations, not just URIs.

  • Add `| stats sum(count) as total by uri` after the existing stats.

    Why it's wrong here

    This would sum counts but still include method in earlier stats; the second stats would sum over method, but the first stats already separated by method; this could work but is unnecessary; also the head would be applied before second stats? Actually head is after sort, so it would take top 5 combinations, then second stats would sum those 5, not all. So not correct.

  • Change `stats count by uri, method` to `stats count by uri`.

    Why this is correct

    Correct: grouping only by uri gives count per URI.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Splunk often tests the distinction between grouping by multiple fields versus a single field, and the trap here is that candidates may think they need an additional stats command (Option D) or a filter (Option A) when simply removing the extra field from the `by` clause is the correct and efficient fix.

Trap categories for this question

  • Command / output trap

    Top with two fields still shows combinations, not just URIs.

Detailed technical explanation

How to think about this question

The `stats` command in Splunk uses a `by` clause to define the group-by fields; each unique combination of values in those fields generates a separate row. Removing `method` from the `by` clause collapses all rows for the same URI into a single row, summing the counts. This is a common pattern when you need to change the granularity of aggregation from a composite key to a single key, and it avoids the overhead of an extra stats command.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related SPLK-1003 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SPLK-1003 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SPLK-1003 question test?

Advanced Searching and Statistics — This question tests Advanced Searching and Statistics — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Change `stats count by uri, method` to `stats count by uri`. — Option E is correct because the original search uses `stats count by uri, method`, which groups results by both URI and method, producing separate counts for each combination. Changing it to `stats count by uri` removes the method field from the grouping, so the count is aggregated per URI alone, giving the top 5 URIs overall as the analyst expected.

What should I do if I get this SPLK-1003 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More SPLK-1003 practice questions

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This SPLK-1003 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-1003 exam.