Splunk Search

How to use SPLUNK GROUPBY in my search?

jayeshrajvir
Explorer

A002 : A]
[A004 : 2]
[A005 : 2000]
[A006 : 0110]
[A007 : 85]
[A008 : VISA Credit]
[A008.ID : 9]
[A010 : 1644757200000]
[A019 : ANZ 407220]
[A021 : 20]
[A022 : A]

[RESPONDER : 5]

[A028 : 85]

SELECT A028, responder, count( * ) as total from table
where A028 <> '00' group by auth_resp_cde, auth_responder

The above one is SQL query i wanted to similar query in the SPLNK please assist. 

Labels (1)
Tags (2)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @jayeshrajvir,

I suppose that you already extracted all the fields from your logs and you need only the search to display results grouped by; if not, you have also to extract all used fields.

So, please try something like this:

index=your_index A028!="00"
| stats values(A028) AS A28 values(responder) AS responder count AS total BY auth_resp_cde auth_responder

Ciao.

Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @jayeshrajvir,

I suppose that you already extracted all the fields from your logs and you need only the search to display results grouped by; if not, you have also to extract all used fields.

So, please try something like this:

index=your_index A028!="00"
| stats values(A028) AS A28 values(responder) AS responder count AS total BY auth_resp_cde auth_responder

Ciao.

Giuseppe

0 Karma

jayeshrajvir
Explorer

Thanks for your help. It's working

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @jayeshrajvir,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...