<?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: Ranking in proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Ranking-in-proc-sql/m-p/847240#M334977</link>
    <description>&lt;P&gt;No. You can do something similar using SQL Naitive Window Functions, but sadly, they're not supported in Proc SQL.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2022 12:40:48 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2022-12-01T12:40:48Z</dc:date>
    <item>
      <title>Ranking in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ranking-in-proc-sql/m-p/847238#M334975</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;data want;
set have;
by id;
if first.id then rank =1;
else rank+1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the above code, I wanted to get this RANK variable by using proc sql.&lt;/P&gt;
&lt;P&gt;is there any method ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Abhinay&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 12:26:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ranking-in-proc-sql/m-p/847238#M334975</guid>
      <dc:creator>abhinayingole</dc:creator>
      <dc:date>2022-12-01T12:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ranking-in-proc-sql/m-p/847239#M334976</link>
      <description>&lt;P&gt;No. SQL does not have the concept of processing records in any particular order.&lt;/P&gt;
&lt;P&gt;If you want to use a PROC you might try PROC RANK, but you would need to see if it handles ties in the same way or not.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 12:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ranking-in-proc-sql/m-p/847239#M334976</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-01T12:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Ranking in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ranking-in-proc-sql/m-p/847240#M334977</link>
      <description>&lt;P&gt;No. You can do something similar using SQL Naitive Window Functions, but sadly, they're not supported in Proc SQL.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 12:40:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ranking-in-proc-sql/m-p/847240#M334977</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-12-01T12:40:48Z</dc:date>
    </item>
  </channel>
</rss>

