<?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 convert this SQL query to splunk search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-this-SQL-query-to-splunk-search/m-p/267568#M80497</link>
    <description>&lt;P&gt;Try something like,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourceltype=bar MSG_NUM=cma* 
| bucket span=1h _time
| stats dc(CHNL) as uniq_channels by _time MSG_TM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourceltype=bar MSG_NUM=cma* 
| timechart span=1h  dc(CHNL)  by MSG_TM
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 02 Feb 2017 16:50:06 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-02-02T16:50:06Z</dc:date>
    <item>
      <title>How to convert this SQL query to splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-this-SQL-query-to-splunk-search/m-p/267566#M80495</link>
      <description>&lt;P&gt;Hi , &lt;BR /&gt;
I have a sql query ,&lt;BR /&gt;
Count distinct CHNL where MSG_NUM like 'cma%' group by MSG_TM. &lt;BR /&gt;
Result should get display in hourly basis,&lt;/P&gt;

&lt;P&gt;all the CHNL , MSG_NUM , MSG_TM is the column name , which has values . Kindly need your help to convert it .Result should be  in hourly basis.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:39:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-this-SQL-query-to-splunk-search/m-p/267566#M80495</guid>
      <dc:creator>benazir</dc:creator>
      <dc:date>2020-09-29T12:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert this SQL query to splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-this-SQL-query-to-splunk-search/m-p/267567#M80496</link>
      <description>&lt;P&gt;Is your data already indexed or are you trying to read a SQL database from Splunk?  If the former, see &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/SQLtoSplunk"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/SQLtoSplunk&lt;/A&gt;.  If the latter, check out the Splunk DB Connect app.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 12:45:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-this-SQL-query-to-splunk-search/m-p/267567#M80496</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-02-02T12:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert this SQL query to splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-this-SQL-query-to-splunk-search/m-p/267568#M80497</link>
      <description>&lt;P&gt;Try something like,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourceltype=bar MSG_NUM=cma* 
| bucket span=1h _time
| stats dc(CHNL) as uniq_channels by _time MSG_TM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourceltype=bar MSG_NUM=cma* 
| timechart span=1h  dc(CHNL)  by MSG_TM
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Feb 2017 16:50:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-this-SQL-query-to-splunk-search/m-p/267568#M80497</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-02T16:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert this SQL query to splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-this-SQL-query-to-splunk-search/m-p/267569#M80498</link>
      <description>&lt;P&gt;Thank you so much it works perfect with few modification.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2017 14:14:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-this-SQL-query-to-splunk-search/m-p/267569#M80498</guid>
      <dc:creator>benazir</dc:creator>
      <dc:date>2017-02-05T14:14:39Z</dc:date>
    </item>
  </channel>
</rss>

