I hope the below Base SAS Certification sample question is helpful when you're studying for the exam. Leave your answer as a comment below and good luck!
-SAS Cert
******************************
What should the blank line below read to be able to output the sum of Qtr_total by the variable paid_by?
proc sort data=ecsql1.employee_donations out=work.employee_donations_sort;
by paid_by;
run;
data work.donations (keep=paid_by Qtr_total);
set work.employee_donations_sort;
by paid_by;
Qtr_total + Qtr1;
if _____________;
run;
a) last paid_by
b) paid_by.last
c) paid_by.last = 1
d) last.paid_by = 1
ans D, or doesn't "if last.paid_by;" work the same without the =1? btw are you going to post answers for older questions? I'm cramming to take the base cert exam this weekend at the global conference.
ReplyDeletea); clarification a) = d) in this case?
ReplyDeleteD. Because by group processing creates two automatic variable first.variable and last.variable. These two can be used to produce output if any of two is equal to 1. Eg. If last.variable= 1 then output. I hope it opens for new thoughts.
ReplyDeleteD
ReplyDeleteD
ReplyDeleteAnswer is D.
ReplyDeleteA is wrong because it is missing the dot between the last and the variable name.
If it had the dot, both A and D would be correct because SAS interprets "if last.variable" by itself to mean the same thing as "if last.variable = 1". It is a shorthand way of writing it.