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!

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

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...

It’s go time — Boston, here we come!

Are you ready to take your Splunk skills to the next level? Get set, because Splunk University is back, and ...

Performance Tuning the Platform, SPL2 Templates, and More New Articles on Splunk ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...