IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;
run;
Which one of the following BY statements completes the program and sorts the data sequentially by descending expense values within each descending IDNUMBER value?
A. by descending IDNumber Expenses;
B. by (IDNumber Expenses) descending;
C. by IDNumber descending Expenses descending;
D. by descending IDNumber descending Expenses;
5 comments:
Answer: D
You need by descending IDNumber descending Expenses;
Try it…
data EMPLOYEE_INFO;
input IDNumber Expenses;
cards;
2542 100.00
3612 133.15
2198 234.34
2198 111.12
;
run;
proc sort data=EMPLOYEE_INFO;
by descending IDNumber descending Expenses;
run;
IDNumber Expenses
3612 133.15
2542 100
2198 234.34
2198 111.12
D. by descending IDNumber descending Expenses;
Answer is D.
Please see SASGuru's comment.
And, keep in mind the keyword 'DESCENDING' appears before data set variable.
Answer is D
D
Post a Comment