data a;
input id score;
cards;
1 100
1 200
1 300
2 100
2 200
2 300
;
run;
data b;
input id name $;
cards;
1 nagato
2 sakura
;
data temp;
merge a b;
by id;
if last.id;
run;
请问为什么temp里只有2个观测值,且是datase a里每个ID的最后的值呢?
if last.id;这句代码的作用是什么?
NOTE: There were 6 observations read from the data set WORK.A.
NOTE: There were 2 observations read from the data set WORK.B.
NOTE: The data set WORK.TEMP has 2 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.09 seconds
cpu time 0.03 seconds