<?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: Nested search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Nested-search/m-p/116749#M31008</link>
    <description>&lt;P&gt;You'll want to use a subsearch (see &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/SearchTutorial/Useasubsearch"&gt;http://docs.splunk.com/Documentation/Splunk/6.0/SearchTutorial/Useasubsearch&lt;/A&gt; ).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=transaction_detail [search sourcetype="transaction_status" status="completed" | fields transaction_id] | stats count by vendor_id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 27 Oct 2013 07:54:52 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2013-10-27T07:54:52Z</dc:date>
    <item>
      <title>Nested search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-search/m-p/116748#M31007</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have 2 dump files and put separate them into 2 sourcetypes, sourcetype=transaction_status and sourcetype=transaction_detail. Here are some data from both sourcetype :&lt;/P&gt;

&lt;P&gt;sourcetype=transaction_status :&lt;/P&gt;

&lt;P&gt;transaction_id: 1004 status: completed&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1005 status: completed&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1006 status: pending_payment&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1007 status: pending_payment&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1008 status: completed&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1009 status: completed&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1010 status: pending_payment&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1011 status: completed  &lt;/P&gt;

&lt;P&gt;sourcetype=transaction_detail :&lt;/P&gt;

&lt;P&gt;transaction_id: 1004 vendor_id: 03 tag: ""&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1005 vendor_id: 07 tag: ""&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1006 vendor_id: 03 tag: ""&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1007 vendor_id: 03 tag: ""&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1008 vendor_id: 03 tag: ""&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1009 vendor_id: 01 tag: ""&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1010 vendor_id: 07 tag: ""&lt;BR /&gt;&lt;BR /&gt;
transaction_id: 1011 vendor_id: 03 tag: ""  &lt;/P&gt;

&lt;P&gt;I want to have a graph that shows the top 10 of vendor that have completed status. I can search which transaction_id that have status completed from sourcetype transaction_status (that's easy), but how to search which vendor related to these transaction_id (using data from sourcetype transaction_detail) ?&lt;/P&gt;

&lt;P&gt;So the output would be :&lt;/P&gt;

&lt;P&gt;vendor_id count&lt;BR /&gt;&lt;BR /&gt;
3           3&lt;BR /&gt;&lt;BR /&gt;
1           1&lt;BR /&gt;&lt;BR /&gt;
7           1   &lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;
Frank&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2013 06:55:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-search/m-p/116748#M31007</guid>
      <dc:creator>frankagustinus</dc:creator>
      <dc:date>2013-10-27T06:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Nested search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-search/m-p/116749#M31008</link>
      <description>&lt;P&gt;You'll want to use a subsearch (see &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/SearchTutorial/Useasubsearch"&gt;http://docs.splunk.com/Documentation/Splunk/6.0/SearchTutorial/Useasubsearch&lt;/A&gt; ).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=transaction_detail [search sourcetype="transaction_status" status="completed" | fields transaction_id] | stats count by vendor_id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Oct 2013 07:54:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-search/m-p/116749#M31008</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-10-27T07:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Nested search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-search/m-p/116750#M31009</link>
      <description>&lt;P&gt;sourcetype=transaction_status status="completed" | stats count by transaction_id | appendcols [search sourcetype="transaction_detail" | stats count by transaction_id vendor_id]| stats sum(count) as count by vendor_id&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:05:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-search/m-p/116750#M31009</guid>
      <dc:creator>amarsaroj</dc:creator>
      <dc:date>2020-09-28T15:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Nested search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Nested-search/m-p/116751#M31010</link>
      <description>&lt;P&gt;Hi Ayn, &lt;/P&gt;

&lt;P&gt;I tried your approach and works perfectly. Thanks .. I didn't realize it is that simple. And with some modification based from amarsaroj approach (using appendcols), we were able to create more complex chart.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2013 07:22:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Nested-search/m-p/116751#M31010</guid>
      <dc:creator>frankagustinus</dc:creator>
      <dc:date>2013-11-06T07:22:18Z</dc:date>
    </item>
  </channel>
</rss>

