<?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 First Record of Each Group in Query Builder in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/First-Record-of-Each-Group-in-Query-Builder/m-p/26313#M3867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table called "test".&amp;nbsp; It contains all the employment applications received.&amp;nbsp; The dataset contains numerous rows for each application because each is reviewed by various people.&amp;nbsp; I wrote a code create a dataset containing data when each application was first reviewed.&amp;nbsp; Is there a way to do the same in query builder? Thanks! &lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 08 Oct 2011 19:53:46 GMT</pubDate>
    <dc:creator>jen123</dc:creator>
    <dc:date>2011-10-08T19:53:46Z</dc:date>
    <item>
      <title>First Record of Each Group in Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/First-Record-of-Each-Group-in-Query-Builder/m-p/26313#M3867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table called "test".&amp;nbsp; It contains all the employment applications received.&amp;nbsp; The dataset contains numerous rows for each application because each is reviewed by various people.&amp;nbsp; I wrote a code create a dataset containing data when each application was first reviewed.&amp;nbsp; Is there a way to do the same in query builder? Thanks! &lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Oct 2011 19:53:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/First-Record-of-Each-Group-in-Query-Builder/m-p/26313#M3867</guid>
      <dc:creator>jen123</dc:creator>
      <dc:date>2011-10-08T19:53:46Z</dc:date>
    </item>
    <item>
      <title>First Record of Each Group in Query Builder</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/First-Record-of-Each-Group-in-Query-Builder/m-p/26314#M3868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on how your source table look like (and how you solved in your program).&lt;/P&gt;&lt;P&gt;But if it can be solved in a single, fairly simple SQL, the chances are, yes, you might can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have an application id, and a timestamp on each row which defines the time when the application was reviewed, you might do something like this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Define MIN as summary on your timestamp column&lt;/LI&gt;&lt;LI&gt;Define the application id as Group By column. You'll have to un-check "Automatically Select groups" if you have other columns that you want to keep, other than the id.&lt;/LI&gt;&lt;LI&gt;Define a Having condition that will filter out rows that has timestamp = min(timestamp):&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;Filter data - Filter Summarized Data - New Filter&lt;/LI&gt;&lt;LI&gt;Basic Filter&lt;/LI&gt;&lt;LI&gt;Select MIN_of_timestamp column from the data columns section&lt;/LI&gt;&lt;LI&gt;Define it as Equal to - Value - Columns - Timestamp&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And run...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Linus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 17:59:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/First-Record-of-Each-Group-in-Query-Builder/m-p/26314#M3868</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2011-10-10T17:59:57Z</dc:date>
    </item>
  </channel>
</rss>

