SPL2 commands that sort results
When you run a search that returns events, by default the events are returned in descending timestamp order, with the most current events returned first.
There are some SPL2 commands that sort the search results automatically. These command have some sort of BY clause:
- FROM GROUP BY clause
- FROM ORDER BY clause
- sort <sort-by-clause>
- stats <by-clause>
- streamstats <by-clause>
- timechart <split-by-clause>
The field that you specify in the by-clause is the field on which the results are sorted.
See also
- Related information
- Lexicographical order
This documentation applies to the following versions of Splunk® Cloud Services: current
Feedback submitted, thanks!