title: How to append two queries in splunk?
body: <p>I have following two queries:</p>
  
  <p><code>host="abc*" sourcetype="xyz" Request="some.jsp"
  | stats count as "TotalCount" by Request</code></p>
  
  <p>This gives the total count of requests</p>
  
  <p>and </p>
  
  <p><code>host="abc*" sourcetype="xyz" Request="some.jsp"
  | where TimeTaken &lt; 6000
  | stats count as "ReqLT6Sec" by Request</code></p>
  
  <p>This gives count of requests which took less than 6 seconds response time.</p>
  
  <p>My requirement is to get these two results by running a single query. I tried appending the queries as below:</p>
  
  <p><code>host="abc*" sourcetype="xyz" Request="some.jsp"
  | stats count as "TotalCount" by Request
  | append
  [search host="abc*" sourcetype="xyz" Request="some.jsp"
  | where TimeTaken &lt; 6000
  | stats count as "ReqLT6Sec" by Request]</code></p>
  
  <p>This would work for simple request as above like single jsp, but if I am using wild card for Request and data is huge, count of "ReqLT6Sec" is not matching with result obtained by running individual query runs. Any help is appreciated to get this in simpler way.</p>
  
  <p>Thanks.</p>