A00-211 Exam QuestionsBrowse all questions from this exam

A00-211 Exam - Question 46


The SAS data set WORK.AWARDS is listed below:

fname points

Amy 2 -

Amy 1 -

Gerard 3 -

Wang 3 -

Wang 1 -

Wang 2 -

The following SAS program is submitted:

proc sort data = work.awards;

by descending fname points;

run;

Which one of the following represents how the observations are sorted?

Show Answer
Correct Answer: CD

The PROC SORT statement with 'by descending fname points;' first sorts the data by 'fname' in descending order and then by 'points' in descending order for each 'fname'. Therefore, 'Wang' will appear first, followed by 'Gerard', and then 'Amy'. Within each 'fname', the 'points' are sorted in descending order. This results in the sequence 'Wang 3 Wang 2 Wang 1 Gerard 3 Amy 2 Amy 1'.

Discussion

2 comments
Sign in to comment
JKoOption: D
Jun 5, 2019

D. Wang 1 Wang 2 Wang 3 Gerard 3 Amy 1 Amy 2

Kleinstone
Jan 2, 2021

Correct!