<?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: PROC SQL Most common variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Most-common-variables/m-p/534669#M146745</link>
    <description>1. Try ordering the data, so sort by U_PROB descending so that the top are on top. &lt;BR /&gt;2. Add OUTOBS=3 to limit to the top 3 but then you may lose any duplicates.</description>
    <pubDate>Mon, 11 Feb 2019 23:50:02 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-02-11T23:50:02Z</dc:date>
    <item>
      <title>PROC SQL Most common variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Most-common-variables/m-p/534665#M146742</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to know the top 3 most common reason for visit for each birth group for a dataset with 2 columns where:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Column 1 has&amp;nbsp;birth group (so like child, senior, adult, etc) [BD_CLASS]&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Column 2 has that’s their reason for visiting the ER. [main_problem]&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
SELECT BD_CLASS, count(unique(main_problem)) as u_PROB
FROM work.test12
group by BD_Class;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but that only told me the number of unique problems in each birth group; not the most popular ones.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 23:35:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Most-common-variables/m-p/534665#M146742</guid>
      <dc:creator>takahasm</dc:creator>
      <dc:date>2019-02-11T23:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Most common variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Most-common-variables/m-p/534667#M146743</link>
      <description>&lt;P&gt;Does this have to be done with SQL?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 23:44:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Most-common-variables/m-p/534667#M146743</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-02-11T23:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Most common variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Most-common-variables/m-p/534668#M146744</link>
      <description>&lt;P&gt;no it doesn't!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 23:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Most-common-variables/m-p/534668#M146744</guid>
      <dc:creator>takahasm</dc:creator>
      <dc:date>2019-02-11T23:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL Most common variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Most-common-variables/m-p/534669#M146745</link>
      <description>1. Try ordering the data, so sort by U_PROB descending so that the top are on top. &lt;BR /&gt;2. Add OUTOBS=3 to limit to the top 3 but then you may lose any duplicates.</description>
      <pubDate>Mon, 11 Feb 2019 23:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-Most-common-variables/m-p/534669#M146745</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-11T23:50:02Z</dc:date>
    </item>
  </channel>
</rss>

