<?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: Grouping Aggregate Queries Together in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Grouping-Aggregate-Queries-Together/m-p/19056#M122</link>
    <description>&lt;P&gt;This seems to work, but is there a better way? Would &lt;CODE&gt;selfjoin&lt;/CODE&gt;, &lt;CODE&gt;timechart&lt;/CODE&gt;, or &lt;CODE&gt;buckets&lt;/CODE&gt; be a better approach?&lt;/P&gt;

&lt;PRE&gt;
index="myIndex" host=myHost daysago=30 | stats Count as 30Days by username | 
join username [search index="myIndex" host=myHost daysago=60 | stats Count as 60Days by username] | 
join username [search index="myIndex" host=myHost daysago=90 | stats Count as 90Days by username] |
join username [search index="myIndex" host=myHost daysago=120 | stats Count as 120Days by username]|
fields username, 30Days, 60Days, 90Days, 120Days
&lt;/PRE&gt;</description>
    <pubDate>Wed, 31 Oct 2012 21:33:40 GMT</pubDate>
    <dc:creator>slierninja</dc:creator>
    <dc:date>2012-10-31T21:33:40Z</dc:date>
    <item>
      <title>Grouping Aggregate Queries Together</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Grouping-Aggregate-Queries-Together/m-p/19055#M121</link>
      <description>&lt;P&gt;We want a grouping query showing user activity (&lt;EM&gt;page views&lt;/EM&gt;) using a sliding window. What is the best way to build the query?&lt;/P&gt;

&lt;P&gt;We would like to join the results of the following queries, but present the results as one set.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index="myIndex" host=myHost daysago=30 | stats Count by username&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;STRONG&gt;index="myIndex" host=myHost daysago=60 | stats Count by username&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;STRONG&gt;index="myIndex" host=myHost daysago=90 | stats Count by username&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;STRONG&gt;index="myIndex" host=myHost daysago=120 | stats Count by username&lt;/STRONG&gt;&lt;BR /&gt;&lt;/P&gt;

&lt;P&gt;The output would look like...&lt;BR /&gt;
&lt;BR /&gt;&lt;/P&gt;

&lt;H3&gt;Page Views by User in Last xx Days&lt;/H3&gt;

&lt;PRE&gt;
+--------+--------+---------+---------+----------+
|  User  | 30 Day | 60 Days | 90 Days | 120 Days |
+--------+--------+---------+---------+----------+
| James  |     40 |      55 |      85 |       90 |
| Janet  |     10 |      25 |      30 |       60 |
| Walter |      0 |      15 |      25 |       45 |
+--------+--------+---------+---------+----------+
&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Oct 2012 20:58:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Grouping-Aggregate-Queries-Together/m-p/19055#M121</guid>
      <dc:creator>slierninja</dc:creator>
      <dc:date>2012-10-31T20:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping Aggregate Queries Together</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Grouping-Aggregate-Queries-Together/m-p/19056#M122</link>
      <description>&lt;P&gt;This seems to work, but is there a better way? Would &lt;CODE&gt;selfjoin&lt;/CODE&gt;, &lt;CODE&gt;timechart&lt;/CODE&gt;, or &lt;CODE&gt;buckets&lt;/CODE&gt; be a better approach?&lt;/P&gt;

&lt;PRE&gt;
index="myIndex" host=myHost daysago=30 | stats Count as 30Days by username | 
join username [search index="myIndex" host=myHost daysago=60 | stats Count as 60Days by username] | 
join username [search index="myIndex" host=myHost daysago=90 | stats Count as 90Days by username] |
join username [search index="myIndex" host=myHost daysago=120 | stats Count as 120Days by username]|
fields username, 30Days, 60Days, 90Days, 120Days
&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Oct 2012 21:33:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Grouping-Aggregate-Queries-Together/m-p/19056#M122</guid>
      <dc:creator>slierninja</dc:creator>
      <dc:date>2012-10-31T21:33:40Z</dc:date>
    </item>
  </channel>
</rss>

