Splunk Search

Splunk stats count by two fields

srujan594
Loves-to-Learn

Hi 

Can anyone please help with this extracting stats count by two fields. 

I've below data in each transaction

type                status

A                    200

B                    400

C                    200

B                    200

A                    200

B                    400

A                    500

C                    300

 

I need stats in below format

type              status           count

A                    200                 2

A                   500                  1

B                    200                 1

B                   400                 2                                  

C                 200                   1 

C                 300                   1 

 

Labels (2)
0 Karma

danielcj
Communicator

Hi,

 

Please try the following:

<YOUR_QUERY>
| stats count by type, status
0 Karma
Get Updates on the Splunk Community!

Changes to Splunk Instructor-Led Training Completion Criteria

We’re excited to share an update to our instructor-led training program that enhances the learning experience ...

Stay Connected: Your Guide to January Tech Talks, Office Hours, and Webinars!

❄️ Welcome the new year with our January lineup of Community Office Hours, Tech Talks, and Webinars! &#x1f389; ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...