<?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: Can any one help in equivalent proc sql code. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167621#M43414</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Pradeep, and need some more information Suppose if we have only one by variable. data one; set admit; by&amp;nbsp; a; if first.a; run; Then how to select first. observations from the dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Feb 2014 05:43:04 GMT</pubDate>
    <dc:creator>devarayalu</dc:creator>
    <dc:date>2014-02-10T05:43:04Z</dc:date>
    <item>
      <title>Can any one help in equivalent proc sql code.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167619#M43412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data admit;&lt;/P&gt;&lt;P&gt;input a $ b;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;aa 1&lt;/P&gt;&lt;P&gt;aa 3&lt;/P&gt;&lt;P&gt;bb 1&lt;/P&gt;&lt;P&gt;bb 2&lt;/P&gt;&lt;P&gt;dd 1&lt;/P&gt;&lt;P&gt;cc&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;proc sort data=admit;&lt;/P&gt;&lt;P&gt;by&amp;nbsp; a b;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;set admit;&lt;/P&gt;&lt;P&gt;by&amp;nbsp; a b;&lt;/P&gt;&lt;P&gt;if first.a;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Can any one help what will be the equivalent proc sql code?&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Feb 2014 07:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167619#M43412</guid>
      <dc:creator>devarayalu</dc:creator>
      <dc:date>2014-02-08T07:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can any one help in equivalent proc sql code.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167620#M43413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select&amp;nbsp; * from (select distinct * from admit) group by a having b=min(b)&lt;/P&gt;&lt;P&gt;order by a;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Feb 2014 10:14:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167620#M43413</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2014-02-08T10:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can any one help in equivalent proc sql code.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167621#M43414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Pradeep, and need some more information Suppose if we have only one by variable. data one; set admit; by&amp;nbsp; a; if first.a; run; Then how to select first. observations from the dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2014 05:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167621#M43414</guid>
      <dc:creator>devarayalu</dc:creator>
      <dc:date>2014-02-10T05:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can any one help in equivalent proc sql code.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167622#M43415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the SQL-92 Standard :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A table is a multiset of rows.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;multiset: An &lt;SPAN style="text-decoration: underline;"&gt;unordered&lt;/SPAN&gt; collection of objects that are not necessarily distinct. The collection may be empty&lt;/EM&gt;. [my underlying]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus any operration that would rely on observation (row) order (first, last, previous, next, etc) cannot be done directly in SQL.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2014 16:09:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167622#M43415</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-02-10T16:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can any one help in equivalent proc sql code.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167623#M43416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although some undocumented feature aka monotonic() may help you on this, but If only have ONE variable, how can you tell whether it is the first one in the group or otherwise, it does not make any difference as the end result, so you may just as well use DISTINCT clause to get the same outcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2014 17:36:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-any-one-help-in-equivalent-proc-sql-code/m-p/167623#M43416</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-02-10T17:36:43Z</dc:date>
    </item>
  </channel>
</rss>

