<?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: A tiny mistake in practice question 2, p314, SQL1: Essential course note PDF in Advanced Programming</title>
    <link>https://communities.sas.com/t5/Advanced-Programming/A-tiny-mistake-in-practice-question-2-p314-SQL1-Essential-course/m-p/962867#M332</link>
    <description>&lt;P&gt;Great catch! After some investigation it seems like that may have been added in the case of EstYear1PCT being equal to EstYear3PCT. There was no change to the results when I deleted else "No change", but perhaps No change would appear for another value of the RegionValue macro variable- or it was just added as a "catch all". We will look into updating the instructions, thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 28 Mar 2025 18:48:46 GMT</pubDate>
    <dc:creator>CarleighJoC</dc:creator>
    <dc:date>2025-03-28T18:48:46Z</dc:date>
    <item>
      <title>A tiny mistake in practice question 2, p314, SQL1: Essential course note PDF</title>
      <link>https://communities.sas.com/t5/Advanced-Programming/A-tiny-mistake-in-practice-question-2-p314-SQL1-Essential-course/m-p/962415#M326</link>
      <description>&lt;P&gt;There is a tiny mistake in the question (s106s02, part b), on page 314, the values in the CASE WHEN statement (see below) should also include &lt;EM&gt;No Change&lt;/EM&gt;, besides &lt;EM&gt;Increasing, Decreasing,&lt;/EM&gt; and &lt;EM&gt;Unknown&lt;/EM&gt;, according to the answer code on page 319 (see below).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled1.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105577i9AC4A2470E356B95/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled1.png" alt="Untitled1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled2.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105579i667187F48D7F65CB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled2.png" alt="Untitled2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 18:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Advanced-Programming/A-tiny-mistake-in-practice-question-2-p314-SQL1-Essential-course/m-p/962415#M326</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-03-21T18:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: A tiny mistake in practice question 2, p314, SQL1: Essential course note PDF</title>
      <link>https://communities.sas.com/t5/Advanced-Programming/A-tiny-mistake-in-practice-question-2-p314-SQL1-Essential-course/m-p/962867#M332</link>
      <description>&lt;P&gt;Great catch! After some investigation it seems like that may have been added in the case of EstYear1PCT being equal to EstYear3PCT. There was no change to the results when I deleted else "No change", but perhaps No change would appear for another value of the RegionValue macro variable- or it was just added as a "catch all". We will look into updating the instructions, thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 18:48:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Advanced-Programming/A-tiny-mistake-in-practice-question-2-p314-SQL1-Essential-course/m-p/962867#M332</guid>
      <dc:creator>CarleighJoC</dc:creator>
      <dc:date>2025-03-28T18:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: A tiny mistake in practice question 2, p314, SQL1: Essential course note PDF</title>
      <link>https://communities.sas.com/t5/Advanced-Programming/A-tiny-mistake-in-practice-question-2-p314-SQL1-Essential-course/m-p/963190#M333</link>
      <description>&lt;P&gt;Hi Carleigh, thanks a lot for your reply!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I get from your reply is: for the selected value of &amp;amp;Regionvalue macro variable, there is no change between EstYear1PCT and EstYear3PCT; but for other possible values of &amp;amp;Regionvalue macro variable, maybe there is change from&amp;nbsp;EstYear1PCT to EstYear3PCT, and this is the reason that "No Change" was not a value for the "Forecast" column in the question, but it appears in the answer code. Thanks a lot for your explain!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason I posted my thread is: while following the instruction in the question I was a bit confused (because I expected there was a chance of "no change" when comparing two numeric values, also I ignored the instruction that "Unknown" was for null values and did not know which column has missing values in the input dataset), and I wrote my answer like this (see below), I tried twice and did not get it right, then I scrolled to the answer code and see there is a "No Change" value for the Forecast column. I was going to explore the input dataset further but did not want to spend too much time on just one question, so I posted the problem here. Next time when practice this question I will explore the input dataset more. Thanks a lot for your attention and explanation! Best&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select countrycode,indicatorname,
       estyear1/100 as estyear1pct format=percent7.2,
       estyear3/100 as estyear3pct format=percent7.2,
       case when calculated estyear3pct-calculated estyear1pct&amp;gt;0
               then 'Increasing'
            when calculated estyear3pct-calculated estyear1pct&amp;lt;0
               then 'decreasing'
            when calculated estyear3pct-calculated estyear1pct=0
               then 'Unknown'
       end as forecast
   from sq.globalfindex
   /*more statement*/;
quit;
proc sql;
select countrycode,indicatorname,
       estyear1/100 as estyear1pct format=percent7.2,
       estyear3/100 as estyear3pct format=percent7.2,
       case when calculated estyear3pct&amp;gt;calculated estyear1pct
               then 'Increasing'
            when calculated estyear3pct&amp;lt;calculated estyear1pct
               then 'decreasing'
            else 'Unknown'
       end as forecast
   from sq.globalfindex
   /*more statements*/;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Apr 2025 07:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Advanced-Programming/A-tiny-mistake-in-practice-question-2-p314-SQL1-Essential-course/m-p/963190#M333</guid>
      <dc:creator>dxiao2017</dc:creator>
      <dc:date>2025-04-02T07:02:19Z</dc:date>
    </item>
  </channel>
</rss>

