Splunk Search

How to find the counting based on number of values

Ashishanand
New Member

i used the following command
index=ABC
| stats values(L) AS USER

i need the output like below
user usercount
Ramesh 54
Somesh 12
Kamlesh 27

Tags (1)
0 Karma

HiroshiSatoh
Champion

Try this!

index=ABC
| stats count AS usercount by L
| rename L as user 
0 Karma
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!