<?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 Sorting a list in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Sorting-a-list/m-p/198392#M57356</link>
    <description>&lt;P&gt;Hi Splunkers!&lt;/P&gt;

&lt;P&gt;My data looks like this - it may be familiar from a recent high-profile data leak &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;phone number, username, location&lt;BR /&gt;
21209864XX, user001, london&lt;/P&gt;

&lt;P&gt;My hypothesis is to test wether a phonenumber has created more than one account, which in theory should be impossible.&lt;/P&gt;

&lt;P&gt;I want to see a table of phonenumbers and the usernames linked to them, sorted by the phonenumbers that are linked to the most usernames (hopefully that makes sense!)&lt;/P&gt;

&lt;P&gt;I have run a search to group all usernames that share the same phonenumber.&lt;/P&gt;

&lt;P&gt;index="sandbox" | stats list(phonenumber) by username&lt;/P&gt;

&lt;P&gt;I want to sort the resulting table by the lists which contain the most usernames. The search below returns the number of events a unique phonenumber can be found, hence the amount of usernames it is connected too.&lt;/P&gt;

&lt;P&gt;index="sandbox" | stats count(phonenumber) by phonenumber | sort -count(phonenumber)&lt;/P&gt;

&lt;P&gt;What I'm struggling to do is link to two together, to sort the listed table. Can anyone help?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jan 2014 20:46:13 GMT</pubDate>
    <dc:creator>himynamesdave</dc:creator>
    <dc:date>2014-01-08T20:46:13Z</dc:date>
    <item>
      <title>Sorting a list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sorting-a-list/m-p/198392#M57356</link>
      <description>&lt;P&gt;Hi Splunkers!&lt;/P&gt;

&lt;P&gt;My data looks like this - it may be familiar from a recent high-profile data leak &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;phone number, username, location&lt;BR /&gt;
21209864XX, user001, london&lt;/P&gt;

&lt;P&gt;My hypothesis is to test wether a phonenumber has created more than one account, which in theory should be impossible.&lt;/P&gt;

&lt;P&gt;I want to see a table of phonenumbers and the usernames linked to them, sorted by the phonenumbers that are linked to the most usernames (hopefully that makes sense!)&lt;/P&gt;

&lt;P&gt;I have run a search to group all usernames that share the same phonenumber.&lt;/P&gt;

&lt;P&gt;index="sandbox" | stats list(phonenumber) by username&lt;/P&gt;

&lt;P&gt;I want to sort the resulting table by the lists which contain the most usernames. The search below returns the number of events a unique phonenumber can be found, hence the amount of usernames it is connected too.&lt;/P&gt;

&lt;P&gt;index="sandbox" | stats count(phonenumber) by phonenumber | sort -count(phonenumber)&lt;/P&gt;

&lt;P&gt;What I'm struggling to do is link to two together, to sort the listed table. Can anyone help?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2014 20:46:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sorting-a-list/m-p/198392#M57356</guid>
      <dc:creator>himynamesdave</dc:creator>
      <dc:date>2014-01-08T20:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sorting-a-list/m-p/198393#M57357</link>
      <description>&lt;P&gt;Try following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="sandbox" | stats list(username) as usernames by phonenumber | eval count=mvcount(usernames) | sort -count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Jan 2014 21:00:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sorting-a-list/m-p/198393#M57357</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-08T21:00:03Z</dc:date>
    </item>
  </channel>
</rss>

