<?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: Help to convert SQL query to Splunk search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SQL-query-to-Splunk-search/m-p/638700#M221308</link>
    <description>&lt;P&gt;I ran the query, but it does not return all the data.&amp;nbsp; I was able to get a complete list of the asset_id, solution_id, and vulnerability_id, however, there are a few that are empty under solution_summary, vulnerability_title, and severity. Am I missing something in the query?&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;asset_id&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;solution_id&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;vulnerability_id&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;vulnerability_title&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;solution_summary&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;severity&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1234&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;456&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;234&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Certificate expired&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Obtain new certifcate&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Severe&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1234&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;678&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;567&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Security Update for Windows&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Critical&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1234&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;890&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;893&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" 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;</description>
    <pubDate>Tue, 04 Apr 2023 19:16:44 GMT</pubDate>
    <dc:creator>idkgirly</dc:creator>
    <dc:date>2023-04-04T19:16:44Z</dc:date>
    <item>
      <title>How to convert SQL query to Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SQL-query-to-Splunk-search/m-p/638686#M221305</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the following tables:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;asset table:&lt;/STRONG&gt;&lt;BR /&gt;asset_id&lt;BR /&gt;solution_id&lt;BR /&gt;vulnerability_id&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;solution table:&lt;/STRONG&gt;&lt;BR /&gt;solution_id&lt;BR /&gt;solution summary&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;vulnerability table:&lt;/STRONG&gt;&lt;BR /&gt;vulnerability_id&lt;BR /&gt;title&lt;BR /&gt;severity&lt;/P&gt;
&lt;P&gt;How do I write a splunk query to show a table that has the asset_id, solution summary, title, and severity?&lt;/P&gt;
&lt;P&gt;This would be the SQL query that I use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SELECT a.asset_id, b.solution_id, b.summary as solution_summary, c.vulnerability_id, c.title as vulnerability_title, c.severity
FROM asset a
JOIN solution b USING (solution_id) 
JOIN vulnerability c USING(vulnerability_id)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 22:34:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SQL-query-to-Splunk-search/m-p/638686#M221305</guid>
      <dc:creator>idkgirly</dc:creator>
      <dc:date>2023-04-11T22:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help to convert SQL query to Splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SQL-query-to-Splunk-search/m-p/638690#M221306</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=asset_index sourcetype=asset_sourcetype)
| fields asset_id, solution_id, vulnerability_id
| join type=left solution_id [search index=solution_index sourcetype=solution_sourcetype | fields solution_id, solution_summary]
| join type=left vulnerability_id [search index=vulnerability_index sourcetype=vulnerability_sourcetype | fields vulnerability_id, title, severity | rename title as vulnerability_title]
| table asset_id solution_summary vulnerability_title severity&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 Apr 2023 18:09:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SQL-query-to-Splunk-search/m-p/638690#M221306</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2023-04-04T18:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help to convert SQL query to Splunk search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SQL-query-to-Splunk-search/m-p/638700#M221308</link>
      <description>&lt;P&gt;I ran the query, but it does not return all the data.&amp;nbsp; I was able to get a complete list of the asset_id, solution_id, and vulnerability_id, however, there are a few that are empty under solution_summary, vulnerability_title, and severity. Am I missing something in the query?&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;asset_id&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;solution_id&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;vulnerability_id&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;vulnerability_title&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;solution_summary&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;severity&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1234&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;456&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;234&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Certificate expired&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Obtain new certifcate&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Severe&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1234&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;678&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;567&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Security Update for Windows&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Critical&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;1234&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;890&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;893&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%" 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;</description>
      <pubDate>Tue, 04 Apr 2023 19:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SQL-query-to-Splunk-search/m-p/638700#M221308</guid>
      <dc:creator>idkgirly</dc:creator>
      <dc:date>2023-04-04T19:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help to convert SQL query to Splunk search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SQL-query-to-Splunk-search/m-p/639554#M221602</link>
      <description>&lt;P&gt;Where is this data?&amp;nbsp; In SQL DB?&amp;nbsp; In Splunk events?&amp;nbsp; In a Splunk lookup file?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 20:26:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SQL-query-to-Splunk-search/m-p/639554#M221602</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2023-04-11T20:26:36Z</dc:date>
    </item>
  </channel>
</rss>

