<?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 get the top 3 counts for each index? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120744#M32453</link>
    <description>&lt;P&gt;Let me make an example to clarify:&lt;/P&gt;

&lt;P&gt;Now I have the search result like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/468i59BFE461BAC56A5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;How can I get the top 3 counts of each index?&lt;BR /&gt;
In the end, I want to get search result like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/469i6056F8309E97C7FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Hope this is clear. Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jul 2015 22:07:37 GMT</pubDate>
    <dc:creator>lys1030</dc:creator>
    <dc:date>2015-07-13T22:07:37Z</dc:date>
    <item>
      <title>How to get the top 3 counts for each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120744#M32453</link>
      <description>&lt;P&gt;Let me make an example to clarify:&lt;/P&gt;

&lt;P&gt;Now I have the search result like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/468i59BFE461BAC56A5D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;How can I get the top 3 counts of each index?&lt;BR /&gt;
In the end, I want to get search result like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/469i6056F8309E97C7FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Hope this is clear. Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 22:07:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120744#M32453</guid>
      <dc:creator>lys1030</dc:creator>
      <dc:date>2015-07-13T22:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the top 3 counts for each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120745#M32454</link>
      <description>&lt;P&gt;You need the &lt;CODE&gt;top&lt;/CODE&gt; command, like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | top limit=3 count BY index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or, to keep the &lt;CODE&gt;country&lt;/CODE&gt; field, this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | sort 0 - count | streamstats current=t count AS rank by index | where rank&amp;lt;4 | sort 0 index count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Jul 2015 22:10:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120745#M32454</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-13T22:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the top 3 counts for each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120746#M32455</link>
      <description>&lt;P&gt;Thanks, the second one works!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 22:13:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120746#M32455</guid>
      <dc:creator>lys1030</dc:creator>
      <dc:date>2015-07-13T22:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the top 3 counts for each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120747#M32456</link>
      <description>&lt;P&gt;Which one?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 22:16:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120747#M32456</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-13T22:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the top 3 counts for each index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120748#M32457</link>
      <description>&lt;P&gt;Thanks! the second one works perfectly!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 22:33:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-top-3-counts-for-each-index/m-p/120748#M32457</guid>
      <dc:creator>lys1030</dc:creator>
      <dc:date>2015-07-13T22:33:08Z</dc:date>
    </item>
  </channel>
</rss>

