27.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=WORK.TEMPS;
by descending Month Day;
run;
proc print data=WORK.TEMPS;
run;
Which output is correct?
A.
Obs Day Month Temp
— — —– —-
1 2 July 85
2 14 July 89
3 3 June 76
4 15 June 80
5 1 May 75
6 15 May 7
B.
Obs Day Month Temp
— — —– —-
1 1 May 75
2 2 July 85
3 3 June 76
4 14 July 89
5 15 May 70
6 15 June 80
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
D.
Obs Day Month Temp
— — —– —-
1 15 May 70
2 1 May 75
3 15 June 80
4 3 June 76
5 14 July 89
6 2 July 85
Answer: C
如果按照descending不应该是先7月再6月再5月吗?怎么答案会是c呢。
n*****5 发帖数: 61
2
xiexie
s******r 发帖数: 1524
3
month should be string instead of date.
baozi,
xiexie
【在 n*****5 的大作中提到】 : 27.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: