<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to sort search results by numbers in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387594#M113053</link>
    <description>&lt;P&gt;The rounding of search results has already been discussed numerously. But unfortunately, it doesn't work for me.&lt;BR /&gt;
I want to sort the result by total_time in descending order:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="main" sourcetype="web_ping" response_code="200" | stats latest(total_time) by title | sort -num(total_time)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the result is still sorted by the title.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;title   latest(total_time)
brxxx   34.03
bsxxx   86.04
efxxx   157.03
gxxx    265.71
loxxx   340.82
stexxx  179.74
thxxx   239.87
winxxxe 292.73
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do you have a hint? Thank you!&lt;/P&gt;</description>
    <pubDate>Sat, 13 Jul 2019 13:51:34 GMT</pubDate>
    <dc:creator>tobi2k</dc:creator>
    <dc:date>2019-07-13T13:51:34Z</dc:date>
    <item>
      <title>How to sort search results by numbers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387594#M113053</link>
      <description>&lt;P&gt;The rounding of search results has already been discussed numerously. But unfortunately, it doesn't work for me.&lt;BR /&gt;
I want to sort the result by total_time in descending order:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="main" sourcetype="web_ping" response_code="200" | stats latest(total_time) by title | sort -num(total_time)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the result is still sorted by the title.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;title   latest(total_time)
brxxx   34.03
bsxxx   86.04
efxxx   157.03
gxxx    265.71
loxxx   340.82
stexxx  179.74
thxxx   239.87
winxxxe 292.73
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do you have a hint? Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 13:51:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387594#M113053</guid>
      <dc:creator>tobi2k</dc:creator>
      <dc:date>2019-07-13T13:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort search results by numbers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387595#M113054</link>
      <description>&lt;P&gt;total_time does not exist. It is now latest (total_time).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats latest(total_time) by title | sort -latest(total_time)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:18:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387595#M113054</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2020-09-30T01:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort search results by numbers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387596#M113055</link>
      <description>&lt;P&gt;Thanks for your answer. I don't get it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="main" sourcetype="web_ping" response_code="200" | stats latest(total_time) by title | sort -latest
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;still deliver the result in the wrong order (highest number first)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    title   latest(total_time)
    bxxx    30.01
    bxxx    84.33
    efxxx   144.48
    gxxx    251.93
    loxxx   263.72
    etc...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Jul 2019 15:23:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387596#M113055</guid>
      <dc:creator>tobi2k</dc:creator>
      <dc:date>2019-07-13T15:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort search results by numbers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387597#M113056</link>
      <description>&lt;P&gt;Please look at my answer.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 00:21:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387597#M113056</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2019-07-14T00:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort search results by numbers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387598#M113057</link>
      <description>&lt;P&gt;Works like a charm! Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 06:16:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-search-results-by-numbers/m-p/387598#M113057</guid>
      <dc:creator>tobi2k</dc:creator>
      <dc:date>2019-07-22T06:16:18Z</dc:date>
    </item>
  </channel>
</rss>

