SAS Certified Base Programmer 123 Questions (92)
The following SAS program is submitted:
proc report data = sasuser.houses nowd headline headskip; column style price; where price <100000; <insert code here> title; run;
Exhibit: output from the REPORT procedure.
Style Price RANCH $64,000 SPLIT $65,850 CONDO $80,050 RANCH $86,650 SPLIT $94,450 SPLIT $73,650 CONDO $79,350 TWOSTORY $55,850 RANCH $89,100 TWOSTORY $69,250 RANCH $34,500
Assuming that the PRICE variable is numeric, which one of the following completes the program and produces the output displayed in the exhibit?
A.
define style / group 'Style';
define price / mean 'Price' format = dollar9.;
B.
define style / display 'Style';
define price / across 'Price' format = dollar9.;
C.
define style / display 'Style';
define price / sum 'Price' format = dollar9.;
D.
define style / order 'Style';
define price / mean 'Price' format = dollar9.;
Topics:
SAS Base Questions |
3 Comments »
C
why are you using “sum” here? isn’t it B where you are defining price and across with a price format?
why we need SUM function in C since the result doesn’t include a SUM. Please can someone explain. thanks!