<?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 SQL Query to get most latest record of ID's in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378184#M141022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have a table which has ID,Name,Skill1,Skill2,Skill3,Mthyr as fileds in it.I need to get the max record of a ID.Lets supppose ID =1 has Mnthyr as 201209 as the latest record and ID =2 has 201211 as the latest record.In my resultant table i want only these records i meant latest records for the Id's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Aug 2012 18:12:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-15T18:12:51Z</dc:date>
    <item>
      <title>SQL Query to get most latest record of ID's</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378184#M141022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have a table which has ID,Name,Skill1,Skill2,Skill3,Mthyr as fileds in it.I need to get the max record of a ID.Lets supppose ID =1 has Mnthyr as 201209 as the latest record and ID =2 has 201211 as the latest record.In my resultant table i want only these records i meant latest records for the Id's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 18:12:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378184#M141022</guid>
      <dc:creator />
      <dc:date>2012-08-15T18:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query to get most latest record of ID's</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378185#M141023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the attachment with qvw and your excelfile. I think that's what you're looking for.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Short explanation:&lt;/P&gt;&lt;P&gt;- make a query in which you group by ID on max(date)&lt;/P&gt;&lt;P&gt;- join the fields you miss&amp;nbsp; due to the group by query&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 19:02:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378185#M141023</guid>
      <dc:creator />
      <dc:date>2012-08-15T19:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query to get most latest record of ID's</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378186#M141024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Lavanya, I assume MSID and Mnthyr combination identifies the unique record (as Key). Please s&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;ee if the below mentioned script and attached samples helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;BR /&gt;LOAD DISTINCT MSID,&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(Mnthyr) AS Mnthyr&lt;BR /&gt;FROM&lt;BR /&gt;Book1.xlsx&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1)&lt;BR /&gt;GROUP BY&amp;nbsp; MSID;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TempKey:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;BR /&gt;MSID&amp;amp;Mnthyr AS %Key&lt;BR /&gt;RESIDENT&lt;BR /&gt;Temp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Book:&lt;BR /&gt;LOAD MSID&amp;amp;Mnthyr AS %Key,&lt;BR /&gt;*&lt;BR /&gt;FROM&lt;BR /&gt;[Book1.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1)&lt;BR /&gt;WHERE EXISTS (%Key,MSID&amp;amp;Mnthyr);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLES TempKey,Temp;&lt;BR /&gt;DROP FIELD %Key;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 19:18:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378186#M141024</guid>
      <dc:creator>manojkvrajan</dc:creator>
      <dc:date>2012-08-15T19:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query to get most latest record of ID's</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378187#M141025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manoj,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for the reply I just added the filed Mnthyr but I need to get the Latest record of all th eMSId because of the skill info is not changed the same record will be maintained for a particular MSID.In that case&amp;nbsp; i need to look at the latest record of all the MSID's irrespective of &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need more info.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 07:30:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378187#M141025</guid>
      <dc:creator />
      <dc:date>2012-08-16T07:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query to get most latest record of ID's</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378188#M141026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manoj,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for the reply I just added the filed Mnthyr but I need to get the Latest record of all th eMSId because of the skill info is not changed the same record will be maintained for a particular MSID.In that case&amp;nbsp; i need to look at the latest record of all the MSID's irrespective of &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need more info.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 07:31:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378188#M141026</guid>
      <dc:creator />
      <dc:date>2012-08-16T07:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query to get most latest record of ID's</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378189#M141027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lavanya,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; See if this code will do what you need:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;maxOfID:&lt;/P&gt;&lt;P&gt;load max(Mnthyr) as MAXID, MSID&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;Book1.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1) Group by MSID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;load MSID&amp;amp;'_'&amp;amp;MAXID as key Resident maxOfID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (data)&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;MSID&amp;amp;'_'&amp;amp;Mnthyr as key&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;Book1.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop Table maxOfID;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 07:47:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378189#M141027</guid>
      <dc:creator>daveamz</dc:creator>
      <dc:date>2012-08-16T07:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query to get most latest record of ID's</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378190#M141028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;Lavanya, My understanding of the requirement is to display the skills of the MSID based on the latest Monthyear and ignore the rest. Please find below the quick snapshot. Please provide more information about the additional requirements on this sample data with an example&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="20307" class="jive-image-thumbnail jive-image" onclick="" alt="New.PNG" src="https://community.qlik.com/legacyfs/online/20307_New.PNG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 13:24:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Query-to-get-most-latest-record-of-ID-s/m-p/378190#M141028</guid>
      <dc:creator>manojkvrajan</dc:creator>
      <dc:date>2012-08-16T13:24:45Z</dc:date>
    </item>
  </channel>
</rss>

