SAS Certified Base Programmer 123 Questions (91)
The following SAS program is submitted:
proc report data = work.houses nowd; column style price; where prices <100000; <insert DEFINE statements here> title; run;
Exhibit: the output from the REPORT procedure.
style price CONDO 80,050 79,350 RANCH 64,000 86,650 89,100 34,550 SPLIT 65,850 94,450 73,650 TWOSTORY 55,850 69,250
Assume permanent variable labels have been assigned.
Which one of the following completes the program and produces the output displayed in the exhibit?
A.
define style / display width = 9;
define price / sum format = comma9. width = 10;
B.
define style / width = 9;
define price / sum format = comma9. width = 10;
C.
define style / group width = 9;
define price / sum format = comma9. width = 10;
D.
define style / order width = 9;
define price / sum format = comma9. width = 10;
Topics:
SAS Base Questions |
9 Comments »
D
answer should be C. with ORDER, it displays all the values instead of grouping
@2 yy, please double check!
Answer should be “C” as it only has Group By statement
C-its grouped by style.
Answer is D.
please explain why it is ordered, not grouped,thanks
if grouped by type, then each stype would sum up and get a total of price, such as:
condo 159,400
“group” creates one row for each unique value of the variable, while “order” creates one row for each observation with rows arranged according to the values of the order variable. So the option is “order” here.