Getting Data In

How to sort the contents of a list by timestamp

whydoineedtoreg
New Member

I'm currently querying

source="log" | stats list by Id

Which gives me nicely grouped data.

However I would like the content of those groups sorted by Timestamp.
That is to say I do not want the groups themselves sorted but the records inside each group.

0 Karma
1 Solution

somesoni2
Revered Legend

Right now they will sorted in reverse-chronological/descending order of timestamp (_time field). Do you want to sort in ascending/chronological order? If yes, try like this

source="log" | reverse | stats list by Id

View solution in original post

somesoni2
Revered Legend

Right now they will sorted in reverse-chronological/descending order of timestamp (_time field). Do you want to sort in ascending/chronological order? If yes, try like this

source="log" | reverse | stats list by Id
Get Updates on the Splunk Community!

Developer Spotlight with Brett Adams

In our third Spotlight feature, we're excited to shine a light on Brett—a Splunk consultant, innovative ...

Index This | What can you do to make 55,555 equal 500?

April 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...