<?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: SAS query not counting null records in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-query-not-counting-null-records/m-p/155156#M12117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Missing isn't a distinct value per se. Add a count(missing(col2)) as NullCount or similar (untested)&lt;/P&gt;&lt;P&gt;or count(distinct col2) + count(missing(col2)) as cnt.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 May 2014 15:26:32 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2014-05-12T15:26:32Z</dc:date>
    <item>
      <title>SAS query not counting null records</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-query-not-counting-null-records/m-p/155155#M12116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this sas query:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select col1, count(distinct col2) as cnt from table1 group by col1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are two values of col2 for the same col1, the cnt =2 which is correct. But if one of those 2 values is null, the cnt = 1. i.e it does not consider null as a distinct value. How to rewrite the query so null is considered a distinct value?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 15:21:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-query-not-counting-null-records/m-p/155155#M12116</guid>
      <dc:creator>eagles_dare13</dc:creator>
      <dc:date>2014-05-12T15:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS query not counting null records</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-query-not-counting-null-records/m-p/155156#M12117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Missing isn't a distinct value per se. Add a count(missing(col2)) as NullCount or similar (untested)&lt;/P&gt;&lt;P&gt;or count(distinct col2) + count(missing(col2)) as cnt.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 15:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-query-not-counting-null-records/m-p/155156#M12117</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-05-12T15:26:32Z</dc:date>
    </item>
  </channel>
</rss>

