<?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 Translating SQL Query into Splunk Search Query: &amp;quot;LAG(...) OVER (...)&amp;quot; in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Translating-SQL-Query-into-Splunk-Search-Query-quot-LAG-OVER/m-p/54201#M13224</link>
    <description>&lt;P&gt;Hi, I got stuck in translating the following SQL query into Splunk Search Query:&lt;/P&gt;

&lt;P&gt;"&lt;STRONG&gt;LAG&lt;/STRONG&gt; ( BCOLLDT, 1) &lt;STRONG&gt;OVER&lt;/STRONG&gt; ( &lt;STRONG&gt;PARTITION BY&lt;/STRONG&gt; PID &lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; PID, BCOLLDT, LASTREPTDT, PRCPDD, EXECPRCPUNIQNO )"&lt;/P&gt;

&lt;P&gt;Here, BCOLLDT, PID, LASTREPTDT, PRCPDD, EXECPRCPUNIQNO are fields, respectively.&lt;/P&gt;

&lt;P&gt;Any help ??&lt;/P&gt;</description>
    <pubDate>Wed, 05 Dec 2012 05:34:43 GMT</pubDate>
    <dc:creator>syusjk6</dc:creator>
    <dc:date>2012-12-05T05:34:43Z</dc:date>
    <item>
      <title>Translating SQL Query into Splunk Search Query: "LAG(...) OVER (...)"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Translating-SQL-Query-into-Splunk-Search-Query-quot-LAG-OVER/m-p/54201#M13224</link>
      <description>&lt;P&gt;Hi, I got stuck in translating the following SQL query into Splunk Search Query:&lt;/P&gt;

&lt;P&gt;"&lt;STRONG&gt;LAG&lt;/STRONG&gt; ( BCOLLDT, 1) &lt;STRONG&gt;OVER&lt;/STRONG&gt; ( &lt;STRONG&gt;PARTITION BY&lt;/STRONG&gt; PID &lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; PID, BCOLLDT, LASTREPTDT, PRCPDD, EXECPRCPUNIQNO )"&lt;/P&gt;

&lt;P&gt;Here, BCOLLDT, PID, LASTREPTDT, PRCPDD, EXECPRCPUNIQNO are fields, respectively.&lt;/P&gt;

&lt;P&gt;Any help ??&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2012 05:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Translating-SQL-Query-into-Splunk-Search-Query-quot-LAG-OVER/m-p/54201#M13224</guid>
      <dc:creator>syusjk6</dc:creator>
      <dc:date>2012-12-05T05:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Translating SQL Query into Splunk Search Query: "LAG(...) OVER (...)"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Translating-SQL-Query-into-Splunk-Search-Query-quot-LAG-OVER/m-p/54202#M13225</link>
      <description>&lt;P&gt;It would help those of us who don't use Oracle SQL if we could understand the problem in English. My interpretation is&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;For each PID, sort the events by the list of fields, then compare the BCOLLDT value in each event with the BCOLLDT value in the preceding event.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;But I could be very wrong. And that still doesn't tell me - "what are you trying to accomplish?"&lt;/P&gt;

&lt;P&gt;I often find that a completely different approach with Splunk can give a better answer more quickly. I hesitate to simply translate from SQL to SPL.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2012 08:28:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Translating-SQL-Query-into-Splunk-Search-Query-quot-LAG-OVER/m-p/54202#M13225</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-12-05T08:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Translating SQL Query into Splunk Search Query: "LAG(...) OVER (...)"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Translating-SQL-Query-into-Splunk-Search-Query-quot-LAG-OVER/m-p/54203#M13226</link>
      <description>&lt;P&gt;I'm not very proficient in Oracle SQL syntax either, but maybe this could help somehow? &lt;A href="http://splunk-base.splunk.com/answers/41986/lead-lag-in-splunk"&gt;http://splunk-base.splunk.com/answers/41986/lead-lag-in-splunk&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2012 08:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Translating-SQL-Query-into-Splunk-Search-Query-quot-LAG-OVER/m-p/54203#M13226</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-12-05T08:46:02Z</dc:date>
    </item>
  </channel>
</rss>

