<?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 How to get TOP 10 highest transacation using proc sql in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-get-TOP-10-highest-transacation-using-proc-sql/m-p/856463#M37789</link>
    <description>&lt;P&gt;I have this small code .Could anyone please help me how to limit TOP 10 highest transaction.&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;select make,origin,invoice&lt;BR /&gt;from sashelp.cars&lt;BR /&gt;group by make,origin&lt;BR /&gt;order by make, invoice desc;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jan 2023 13:42:39 GMT</pubDate>
    <dc:creator>animesh123</dc:creator>
    <dc:date>2023-01-31T13:42:39Z</dc:date>
    <item>
      <title>How to get TOP 10 highest transacation using proc sql</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-get-TOP-10-highest-transacation-using-proc-sql/m-p/856463#M37789</link>
      <description>&lt;P&gt;I have this small code .Could anyone please help me how to limit TOP 10 highest transaction.&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;select make,origin,invoice&lt;BR /&gt;from sashelp.cars&lt;BR /&gt;group by make,origin&lt;BR /&gt;order by make, invoice desc;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 13:42:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-get-TOP-10-highest-transacation-using-proc-sql/m-p/856463#M37789</guid>
      <dc:creator>animesh123</dc:creator>
      <dc:date>2023-01-31T13:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to get TOP 10 highest transacation using proc sql</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-get-TOP-10-highest-transacation-using-proc-sql/m-p/856465#M37790</link>
      <description>&lt;P&gt;Question is asked often:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/New-SAS-User/Select-top-N-from-each-group-in-proc-sql/m-p/852214" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/New-SAS-User/Select-top-N-from-each-group-in-proc-sql/m-p/852214&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Generally, I think you would be better off using PROC RANK that SQL as PROC RANK allows you to handle ties in different ways. And just plain old PROC SORT is much easier to code than using SQL.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 16:06:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-get-TOP-10-highest-transacation-using-proc-sql/m-p/856465#M37790</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-31T16:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get TOP 10 highest transacation using proc sql</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-get-TOP-10-highest-transacation-using-proc-sql/m-p/856618#M37809</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select a.make,a.origin,a.invoice
from sashelp.cars as a left join sashelp.cars as b
 on a.make=b.make and a.origin=b.origin and a.invoice&amp;lt;=b.invoice
group by a.make,a.origin,a.invoice
having count(distinct b.invoice) in (1:10)
order by make, invoice desc;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Feb 2023 11:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-get-TOP-10-highest-transacation-using-proc-sql/m-p/856618#M37809</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-02-01T11:40:29Z</dc:date>
    </item>
  </channel>
</rss>

