given the sas data set work.temps:
day month temp
1 May 75
15 May 70
15 June 80
3 June 76
2 July 85
14 July 89
The following program is submitted:
proc sort data=WORKS.TEMPS;
by descending Month Day;
run;
proc print data=WORK.TEMPS;
run;
Which output is correct?
the answer is C:
OBS Day Month Temp
1 1 May 75
2 15 May 70
3 3 June 76
4 15 June 80
5 2 July 85
6 14 July 89
I don't understand why the answer is this?
Since Month is descending ordered, it should be from July to June and then
May.
Who can tell me? Thanks a lot!
A*****a 发帖数: 1091
2
month是字符串,按alphabetical的顺序比的,顺比的话,M在J后面,n在l后面
【在 i*********e 的大作中提到】 : given the sas data set work.temps: : day month temp : 1 May 75 : 15 May 70 : 15 June 80 : 3 June 76 : 2 July 85 : 14 July 89 : The following program is submitted: : proc sort data=WORKS.TEMPS;