<?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 Re: Question on stats command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Question-on-stats-command/m-p/534719#M151108</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you have suggested is same as what i have quoted as an example.&lt;/P&gt;&lt;P&gt;I would like to find the range(_time) (i.e.,duration) for only one sourcetype and other details both the sourcetypes&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jan 2021 16:29:51 GMT</pubDate>
    <dc:creator>Deepz2612</dc:creator>
    <dc:date>2021-01-04T16:29:51Z</dc:date>
    <item>
      <title>Question on stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-stats-command/m-p/534614#M151078</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to find the duration of time for only one sourcetype where as the other values for both the sourcetype..&lt;/P&gt;&lt;P&gt;stats range(_time),values(field_a) by sourcetype,field_b |search sourcetype=abc&lt;/P&gt;&lt;P&gt;The above is not helping,coz field_a value is not present in sourcetype abc,so am recieving null value .&lt;/P&gt;&lt;P&gt;Suggestions please&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jan 2021 16:00:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-stats-command/m-p/534614#M151078</guid>
      <dc:creator>Deepz2612</dc:creator>
      <dc:date>2021-01-02T16:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question on stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-stats-command/m-p/534617#M151079</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/70281"&gt;@Deepz2612&lt;/a&gt;.,&lt;/P&gt;&lt;P&gt;you have to modify your stats command:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats earliest(_time) AS earliest latest(_time) AS latest values(field_a) by sourcetype field_b 
| search sourcetype=abc&lt;/LI-CODE&gt;&lt;P&gt;In this way you have the borders of your time range.&lt;/P&gt;&lt;P&gt;ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jan 2021 21:20:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-stats-command/m-p/534617#M151079</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-02T21:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Question on stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-stats-command/m-p/534719#M151108</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you have suggested is same as what i have quoted as an example.&lt;/P&gt;&lt;P&gt;I would like to find the range(_time) (i.e.,duration) for only one sourcetype and other details both the sourcetypes&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 16:29:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-stats-command/m-p/534719#M151108</guid>
      <dc:creator>Deepz2612</dc:creator>
      <dc:date>2021-01-04T16:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Question on stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-stats-command/m-p/534724#M151110</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/70281"&gt;@Deepz2612&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;In this case, you could try to run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search sourcetype=sourcetype_a
| stats earlist(_time) AS earliest latest(_time) AS latest values(field_a) AS field_a BY sourcetype
| append [ search 
     your_search (sourcetype=sourcetype_a OR sourcetype=sourcetype_b)
     | stats values(field_a) AS field_a BY sourcetype
     ]
| stats values(earliest) AS earliest values(latest) AS latest values(field_a) AS field_a BY sourcetype&lt;/LI-CODE&gt;&lt;P&gt;in this way you have, from the first search, earliest and latest and the other fields for sourcetype_a, and then, from the second search, you have the details for both the sorcetypes.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 16:50:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-stats-command/m-p/534724#M151110</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-04T16:50:11Z</dc:date>
    </item>
  </channel>
</rss>

