<?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: How to use join using stats by count on two different searches? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-join-using-stats-by-count-on-two-different-searches/m-p/416565#M119886</link>
    <description>&lt;P&gt;Get rid of those &lt;CODE&gt;| table first_table&lt;/CODE&gt; and &lt;CODE&gt;| table second_table&lt;/CODE&gt;. The table command is to selectively show the fields from result of the search, so your current searches are trying to return fields 'first_table' and 'second_table' which do not exist and join fails.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:10:32 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2020-09-30T00:10:32Z</dc:date>
    <item>
      <title>How to use join using stats by count on two different searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-join-using-stats-by-count-on-two-different-searches/m-p/416564#M119885</link>
      <description>&lt;P&gt;Hello, I am trying to use the join by userid on 2 different sub queries using join feature, both the queries are returning the data when individually ran, but is not returning the data when used with join, what is missing in query below to join by userid ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-1h sourcetype=GATEWAY | stats count by UserId , cc.Type, Error.Code 
| table first_table | join UserId   [ | search earliest=-1h sourcetype=GATEWAY  ReasonCode="Authorized"| stats count by UserId , cc.Type|  table second_table]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Apr 2019 23:18:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-join-using-stats-by-count-on-two-different-searches/m-p/416564#M119885</guid>
      <dc:creator>msrama5</dc:creator>
      <dc:date>2019-04-15T23:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join using stats by count on two different searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-join-using-stats-by-count-on-two-different-searches/m-p/416565#M119886</link>
      <description>&lt;P&gt;Get rid of those &lt;CODE&gt;| table first_table&lt;/CODE&gt; and &lt;CODE&gt;| table second_table&lt;/CODE&gt;. The table command is to selectively show the fields from result of the search, so your current searches are trying to return fields 'first_table' and 'second_table' which do not exist and join fails.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:10:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-join-using-stats-by-count-on-two-different-searches/m-p/416565#M119886</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-30T00:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join using stats by count on two different searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-join-using-stats-by-count-on-two-different-searches/m-p/416566#M119887</link>
      <description>&lt;P&gt;Start with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-1h sourcetype=GATEWAY
| stats count count(eval(ReasonCode="Authorized")) BY UserId , cc.Type, Error.Code
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Apr 2019 15:14:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-join-using-stats-by-count-on-two-different-searches/m-p/416566#M119887</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-16T15:14:54Z</dc:date>
    </item>
  </channel>
</rss>

