<?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: I need help to understand proc SQl code and to do same in another way. Thanks! in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/I-need-help-to-understand-proc-SQl-code-and-to-do-same-in/m-p/535367#M6474</link>
    <description>&lt;P&gt;I was looking for an explanation for the code what is happening along if there is another way to do that without Proc SQL.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Feb 2019 19:07:10 GMT</pubDate>
    <dc:creator>shanky_44</dc:creator>
    <dc:date>2019-02-13T19:07:10Z</dc:date>
    <item>
      <title>I need help to understand proc SQl code and to do same in another way. Thanks!</title>
      <link>https://communities.sas.com/t5/New-SAS-User/I-need-help-to-understand-proc-SQl-code-and-to-do-same-in/m-p/535242#M6430</link>
      <description>&lt;P&gt;I have very limited understanding of Proc SQl and hoping if someone an help me out here with this code. This is a summary table code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql ;&lt;BR /&gt;create table cnts as&lt;/P&gt;&lt;P&gt;select 1 as ord, trt01an, trt01a, count (distinct USUBJID ) as cnt&lt;BR /&gt;from ads_1 where enrlfl ="Y" group by trt01an, trt01a&lt;BR /&gt;union&lt;BR /&gt;select 2 as ord, trt01an, trt01a, count( distinct usubjid) as cnt&lt;BR /&gt;from ads_1 where QFELOEYE ne "N/A" group by trt01an, trt01a&lt;BR /&gt;union&lt;BR /&gt;select 3 as ord, trt01an, trt01a, count( distinct usubjid) as cnt&lt;BR /&gt;from ads_1 where QFELOEYE = "N/A" group by trt01an, trt01a&lt;BR /&gt;union&lt;BR /&gt;select 6 as ord, trt01an, trt01a, count( distinct usubjid) as cnt&lt;BR /&gt;from ads_1 where saffl ="Y" group by trt01an, trt01a ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 16:00:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/I-need-help-to-understand-proc-SQl-code-and-to-do-same-in/m-p/535242#M6430</guid>
      <dc:creator>shanky_44</dc:creator>
      <dc:date>2019-02-13T16:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to understand proc SQl code and to do same in another way. Thanks!</title>
      <link>https://communities.sas.com/t5/New-SAS-User/I-need-help-to-understand-proc-SQl-code-and-to-do-same-in/m-p/535267#M6440</link>
      <description>&lt;P&gt;What type of help do you need?&lt;/P&gt;
&lt;P&gt;This is counting unique USUBJID within combinations of the variables trt01an and trt01a where different conditions are met (the WHERE) and then stacking the results in a specific order into a data set (union and "value as ord")&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 16:29:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/I-need-help-to-understand-proc-SQl-code-and-to-do-same-in/m-p/535267#M6440</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-02-13T16:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to understand proc SQl code and to do same in another way. Thanks!</title>
      <link>https://communities.sas.com/t5/New-SAS-User/I-need-help-to-understand-proc-SQl-code-and-to-do-same-in/m-p/535367#M6474</link>
      <description>&lt;P&gt;I was looking for an explanation for the code what is happening along if there is another way to do that without Proc SQL.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 19:07:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/I-need-help-to-understand-proc-SQl-code-and-to-do-same-in/m-p/535367#M6474</guid>
      <dc:creator>shanky_44</dc:creator>
      <dc:date>2019-02-13T19:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: I need help to understand proc SQl code and to do same in another way. Thanks!</title>
      <link>https://communities.sas.com/t5/New-SAS-User/I-need-help-to-understand-proc-SQl-code-and-to-do-same-in/m-p/535409#M6479</link>
      <description>&lt;P&gt;Unless you can assume that the 4 categories (ord = 1, 2, 3, 6) are mutually exclusive, there is no simple way to replicate this query with other tools.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can however improve performance by replacing UNION with UNION ALL.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 20:42:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/I-need-help-to-understand-proc-SQl-code-and-to-do-same-in/m-p/535409#M6479</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-02-13T20:42:11Z</dc:date>
    </item>
  </channel>
</rss>

