本文介绍了SAS-压缩多行,保持最高价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试完成以下任务.我已经尝试过使用数组和排序,但是似乎没有任何效果.任何帮助将不胜感激.
I'm trying to accomplish the following. I have tried using arrays and sorting but nothing appears to work.Any help would be appreciated.
Acct Score1 Score2
9999 45 78
9999 58 65
8888 43 80
8888 43 90
8888 31 70
This is what I would like to end up with
Acct Score1 Score2
9999 58 78
8888 43 90
因此,基本上,保持每个帐户的最高得分.
So basically, keep the highest score for each account.
推荐答案
只需使用PROC MEANS
.
proc means data=have nway ;
class acct ;
var score1 score2 ;
output out=want max= ;
run;
这篇关于SAS-压缩多行,保持最高价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!