Splunk Search

Display the lowest duration for all models

moinyuso96
Path Finder

 

SerialNumberDuration
111A200
111A500
2222300
3333100
3333250

 

How can I display only the lowest duration for each SerialNumber.

 | dedup SerialNumber would sometimes get me the larger duration.

 

Expected Output:

SerialNumberDuration
111A200
2222300
3333100

 

Labels (1)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@moinyuso96 

Try

YOUR_SEARCH | stats min(Duration) as Duration by SerialNumber

My Sample Search :

| makeresults | eval _raw="SerialNumber	Duration
111A	200
111A	500
2222	300
3333	100
3333	250"| multikv forceheader=1 | stats min(Duration) as Duration by SerialNumber

 

KV

0 Karma
Get Updates on the Splunk Community!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...