nerdexam
Splunk

SPLK-1002 · Question #259

Which of these stats commands will show the total bytes for each unique combination of page and server?

The correct answer is B. index=web | stats sum (bytes) BY page server. The correct command to show the total bytes for each unique combination of page and server is index=web | stats sum (bytes) BY page server. In Splunk, the stats command is used to calculate aggregate statistics over the dataset, such as count, sum, avg, etc. When using the BY…

Basic Transforming Commands

Question

Which of these stats commands will show the total bytes for each unique combination of page and server?

Options

  • Aindex=web | stats sum (bytes) BY page BY server
  • Bindex=web | stats sum (bytes) BY page server
  • Cindex=web | stats sum(bytes) BY page AND server
  • Dindex=web | stats sum(bytes) BY values (page) values (server)

How the community answered

(45 responses)
  • A
    4% (2)
  • B
    93% (42)
  • D
    2% (1)

Explanation

The correct command to show the total bytes for each unique combination of page and server is index=web | stats sum (bytes) BY page server. In Splunk, the stats command is used to calculate aggregate statistics over the dataset, such as count, sum, avg, etc. When using the BY clause, it groups the results by the specified fields. The correct syntax does not include commas or the word 'AND' between the field names. Instead, it simply lists the field names separated by spaces within the BY clause.

Topics

#stats command#grouping data#sum function#SPL

Community Discussion

No community discussion yet for this question.

Full SPLK-1002 Practice