<?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 error message in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-error-message/m-p/624345#M183914</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/299186"&gt;@matoma&lt;/a&gt;&amp;nbsp; You need an extra pass. Please calculate your max(salary)-salary in 1st pass perhaps in an in line view and the compute the Avg in the outer query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select 'level 1', avg(t) format=comma12. as Avgdiff
from (select max(salary)-salary as t from hw2.mechanicslevel1)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can complete the rest using the above as template&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2020 21:10:14 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2020-02-12T21:10:14Z</dc:date>
    <item>
      <title>PROC SQL error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-error-message/m-p/624344#M183913</link>
      <description>&lt;P&gt;I'm trying to calculate the average difference from each persons salary from the highest salary for their job title. I keep getting an error that the summary functions are nested in a way that's not supported and can't figure out why. Heres what I have.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-02-12 153648.png" style="width: 417px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36084i71E000AF8FBB1056/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-02-12 153648.png" alt="Annotation 2020-02-12 153648.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 20:44:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-error-message/m-p/624344#M183913</guid>
      <dc:creator>matoma</dc:creator>
      <dc:date>2020-02-12T20:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SQL error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-error-message/m-p/624345#M183914</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/299186"&gt;@matoma&lt;/a&gt;&amp;nbsp; You need an extra pass. Please calculate your max(salary)-salary in 1st pass perhaps in an in line view and the compute the Avg in the outer query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select 'level 1', avg(t) format=comma12. as Avgdiff
from (select max(salary)-salary as t from hw2.mechanicslevel1)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can complete the rest using the above as template&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 21:10:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-SQL-error-message/m-p/624345#M183914</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-02-12T21:10:14Z</dc:date>
    </item>
  </channel>
</rss>

