<?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 do you list top items for each group? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328348#M97746</link>
    <description>&lt;P&gt;I want to list the top 3 elements for each group.  How would you do this?&lt;BR /&gt;&lt;BR /&gt;
Examples&lt;BR /&gt;
Name    score&lt;BR /&gt;
Jon     100&lt;BR /&gt;
Jon     54&lt;BR /&gt;
Jon     90&lt;BR /&gt;
Jon     72&lt;BR /&gt;
Jon     87&lt;BR /&gt;
Jane    89&lt;BR /&gt;
Jane    99&lt;BR /&gt;
Jane    66&lt;BR /&gt;
Jane    56&lt;BR /&gt;
Jane    100&lt;/P&gt;

&lt;P&gt;Show the top 3 scores for each person?&lt;/P&gt;

&lt;P&gt;Name  score&lt;BR /&gt;
Jon   100&lt;BR /&gt;
Jon   90&lt;BR /&gt;
Jon   87&lt;BR /&gt;
Jane  100&lt;BR /&gt;
Jane  99&lt;BR /&gt;
Jane  89 &lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2017 16:29:40 GMT</pubDate>
    <dc:creator>peterlandis</dc:creator>
    <dc:date>2017-12-05T16:29:40Z</dc:date>
    <item>
      <title>How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328348#M97746</link>
      <description>&lt;P&gt;I want to list the top 3 elements for each group.  How would you do this?&lt;BR /&gt;&lt;BR /&gt;
Examples&lt;BR /&gt;
Name    score&lt;BR /&gt;
Jon     100&lt;BR /&gt;
Jon     54&lt;BR /&gt;
Jon     90&lt;BR /&gt;
Jon     72&lt;BR /&gt;
Jon     87&lt;BR /&gt;
Jane    89&lt;BR /&gt;
Jane    99&lt;BR /&gt;
Jane    66&lt;BR /&gt;
Jane    56&lt;BR /&gt;
Jane    100&lt;/P&gt;

&lt;P&gt;Show the top 3 scores for each person?&lt;/P&gt;

&lt;P&gt;Name  score&lt;BR /&gt;
Jon   100&lt;BR /&gt;
Jon   90&lt;BR /&gt;
Jon   87&lt;BR /&gt;
Jane  100&lt;BR /&gt;
Jane  99&lt;BR /&gt;
Jane  89 &lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 16:29:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328348#M97746</guid>
      <dc:creator>peterlandis</dc:creator>
      <dc:date>2017-12-05T16:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328349#M97747</link>
      <description>&lt;P&gt;something like this should work &lt;CODE&gt;...|sort 0 Name - score|streamstats count by Name|search count&amp;lt;4|fields - count&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 16:40:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328349#M97747</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-12-05T16:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328350#M97748</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | sort 0 Name -score | dedup 3 Name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Dec 2017 16:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328350#M97748</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-12-05T16:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328351#M97749</link>
      <description>&lt;P&gt;Thanks!  That worked and that was a really fast response.  Very impressed with this community.  Thanks splunkers!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 17:11:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328351#M97749</guid>
      <dc:creator>peterlandis</dc:creator>
      <dc:date>2017-12-05T17:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328352#M97750</link>
      <description>&lt;P&gt;Thanks!  That worked and that was a really fast response.  Very impressed with this community.  Thanks splunkers!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 17:11:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328352#M97750</guid>
      <dc:creator>peterlandis</dc:creator>
      <dc:date>2017-12-05T17:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328353#M97751</link>
      <description>&lt;P&gt;Thanks!  This worked perfectly.  Appreciate the quick response.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 17:13:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328353#M97751</guid>
      <dc:creator>peterlandis</dc:creator>
      <dc:date>2017-12-05T17:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328354#M97752</link>
      <description>&lt;P&gt;Just curious why sort 0.  What does 0 do?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 17:15:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328354#M97752</guid>
      <dc:creator>peterlandis</dc:creator>
      <dc:date>2017-12-05T17:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328355#M97753</link>
      <description>&lt;P&gt;0 essentially means there is no limit to how many events will be sorted. otherwise there is a default limit of 10000&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Sort"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Sort&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 17:17:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328355#M97753</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-12-05T17:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328356#M97754</link>
      <description>&lt;P&gt;Hey @peterlandis, Welcome to the Answers community! @cmerriman and @woodcock are awesome and super helpful. You can accept one of the answers and upvote the second if both worked for you. (You can actually upvote both as well.) This helps others use the answer in the future and awards everyone karma points. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 17:17:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328356#M97754</guid>
      <dc:creator>lfedak_splunk</dc:creator>
      <dc:date>2017-12-05T17:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328357#M97755</link>
      <description>&lt;P&gt;It makes it unlimited, otherwise it limits to 10K.  Be sure to click &lt;CODE&gt;Accept&lt;/CODE&gt; to close the question.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 17:19:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328357#M97755</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-12-05T17:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/576777#M201015</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt;&amp;nbsp;I know this is an old thread, but I had similar requirement. Is it possible that this can be done without doing dedup ?&lt;/P&gt;&lt;P&gt;Is dedup not costly?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 16:54:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/576777#M201015</guid>
      <dc:creator>arusoft</dc:creator>
      <dc:date>2021-11-30T16:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you list top items for each group?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/576789#M201018</link>
      <description>&lt;P&gt;Sure you can. You already had the answer here.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328349/highlight/true#M97747" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/328349/highlight/true#M97747&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 20:12:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-list-top-items-for-each-group/m-p/576789#M201018</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-11-30T20:12:03Z</dc:date>
    </item>
  </channel>
</rss>

