<?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 question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-question/m-p/428513#M281437</link>
    <description>&lt;P&gt;Thank you for answering the question.&lt;/P&gt;&lt;P&gt;I haven't noticed L in NLOBS and reading it as NOBS. Thought there might be some mistake with LABEL which I am not able to figure out.&lt;/P&gt;&lt;P&gt;Anyways, got it now. Thanks Again!&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 17:55:26 GMT</pubDate>
    <dc:creator>monu101</dc:creator>
    <dc:date>2018-01-17T17:55:26Z</dc:date>
    <item>
      <title>PROC SQL question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-question/m-p/428435#M281435</link>
      <description>&lt;P&gt;Given the following SQL procedure output:&lt;BR /&gt;Table&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Physical Obs % Deleted&lt;BR /&gt;EMPLOYEE_ADDRESSES 424&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5.0%&lt;BR /&gt;EMPLOYEE_PAYROLL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;424&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5.0%&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Which SQL query will produce a report for tables in the ORION library which have had at least 5% of&lt;BR /&gt;their physical rows deleted, as shown above?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;A. select MEMNAME 'Table', NOBS 'Physical Obs', DELOBS/NOBS '% Deleted' format=percent6.1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;from dictionary.tables&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;where LIBNAME='ORION' AND DELOBS/NOBS &amp;gt;= .05;&lt;BR /&gt;B. select Table_Name, Num_Rows 'Physical Obs', Deleted_Rows/Num_Rows '% Deleted' format=percent6.1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; from dictionary.DBA_TABLES&lt;BR /&gt;&amp;nbsp; &amp;nbsp; where TABLESPACE_NAME='ORION' AND Deleted_Rows/Num_Rows &amp;gt;= .05;&lt;BR /&gt;C. select MEMNAME 'Table', NLOBS 'Physical Obs', DELOBS/NLOBS LABEL='% Deleted' format=percent6.1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; from dictionary.tables&lt;BR /&gt;&amp;nbsp; &amp;nbsp; where LIBNAME='ORION' AND DELOBS/NLOBS &amp;gt;= .05;&lt;/P&gt;
&lt;P&gt;D. select MEMNAME 'Table', NOBS 'Physical Obs', DELOBS/NOBS LABEL='% Deleted' format=percent6.1&lt;BR /&gt;&amp;nbsp; &amp;nbsp; from dictionary.members&lt;BR /&gt;&amp;nbsp; &amp;nbsp; where LIBNAME='ORION' AND DELOBS/NOBS &amp;gt;= .05;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;correct_answer = "A"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why the choice "C" is wrong?&amp;nbsp;To me it looks like both the choices "A" and "C" are correct. Can someone please explain why the choice "C" is incorrect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-question/m-p/428435#M281435</guid>
      <dc:creator>monu101</dc:creator>
      <dc:date>2018-01-17T15:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-question/m-p/428440#M281436</link>
      <description>&lt;P&gt;The L in NLOBS means "logical".&amp;nbsp; That's how many observations are logically in the data set.&amp;nbsp; The value includes all observations minus the number of deleted observations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That would be the wrong denominator to use for computing percentages.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 16:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-question/m-p/428440#M281436</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-01-17T16:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-question/m-p/428513#M281437</link>
      <description>&lt;P&gt;Thank you for answering the question.&lt;/P&gt;&lt;P&gt;I haven't noticed L in NLOBS and reading it as NOBS. Thought there might be some mistake with LABEL which I am not able to figure out.&lt;/P&gt;&lt;P&gt;Anyways, got it now. Thanks Again!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 17:55:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-question/m-p/428513#M281437</guid>
      <dc:creator>monu101</dc:creator>
      <dc:date>2018-01-17T17:55:26Z</dc:date>
    </item>
  </channel>
</rss>

