Splunk Search

How to write a query using the stats earliest and stats latest ?

Pravinraju
New Member

How to place the "earliest and latest " functions ? Can anyone provide an example of such a query with the output !

Tags (1)
0 Karma

somesoni2
Revered Legend

You can find them here:
http://docs.splunk.com/Documentation/Splunk/7.0.2/SearchReference/Eventorderfunctions#earliest.28X.2...

Remember, since both these functions works on chronological occurrence of events/fields, they work accurately if the field _time is available in the results (before you run the stats command).

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...