<?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: Please help me make a query that counts by comparing values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-query-that-counts-by-comparing-values/m-p/647141#M223996</link>
    <description>&lt;P&gt;Not sure if this is what you are after as your description does quite tally with your example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count(eval(event_id == orig_event_id)) as count by index type&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 15 Jun 2023 11:36:52 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-06-15T11:36:52Z</dc:date>
    <item>
      <title>How to make  a query that counts by comparing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-query-that-counts-by-comparing-values/m-p/647139#M223995</link>
      <description>&lt;PRE&gt;&lt;SPAN&gt;I'm new to splunk and I'm asking for help. &lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;I will give an example as below.
if event_id or orig_event are the same, count them
I want to lookup event_id for case not 3. &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Therefore, in this case, the count of event_id 7 is 2, not 3, so 7 should be the lookup.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;could you possibly help me?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;[data table]&lt;/P&gt;
&lt;TABLE width="319"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;index&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;type&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;event_id&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;orig_event_id&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;A&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;a&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;1&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;A&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;b&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;B&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;c&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;A&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;a&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;3&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;A&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;b&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;B&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;c&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;3&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;A&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;a&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;A&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;b&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;5&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;B&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;c&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;a&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="67.5938px" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="66.25px" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;b&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="73.7656px" height="25px"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="110.391px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[result]&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;a&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;b&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 23:05:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-query-that-counts-by-comparing-values/m-p/647139#M223995</guid>
      <dc:creator>hyewonkim</dc:creator>
      <dc:date>2023-06-15T23:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me make a query that counts by comparing values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-query-that-counts-by-comparing-values/m-p/647141#M223996</link>
      <description>&lt;P&gt;Not sure if this is what you are after as your description does quite tally with your example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count(eval(event_id == orig_event_id)) as count by index type&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 15 Jun 2023 11:36:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-query-that-counts-by-comparing-values/m-p/647141#M223996</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-15T11:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me make a query that counts by comparing values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-query-that-counts-by-comparing-values/m-p/647167#M224002</link>
      <description>There were some mistakes in the content. It has only one value among orig_event_id and event_id.</description>
      <pubDate>Thu, 15 Jun 2023 12:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-query-that-counts-by-comparing-values/m-p/647167#M224002</guid>
      <dc:creator>hyewonkim</dc:creator>
      <dc:date>2023-06-15T12:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me make a query that counts by comparing values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-query-that-counts-by-comparing-values/m-p/647169#M224003</link>
      <description>&lt;P&gt;Are you just after the last event_id and orig_event_id by index and type?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats last(event_id) as event_id last(orig_event_id) as orig_event_id by index type&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 15 Jun 2023 13:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-query-that-counts-by-comparing-values/m-p/647169#M224003</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-15T13:06:16Z</dc:date>
    </item>
  </channel>
</rss>

