贾贡献 发表于 2012-1-15 21:37 
附上类似的数据:
A B C D E
1 1 1 1 1
There's a way in SQL.
data test01;
input a b c d e;
cards;
1 1 1 1 1
1 1 1 1 1
1 0 0 1 1
1 1 0 1 1
1 1 1 1 1
1 1 1 0 0
1 1 1 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 1 1 0 0
0 1 1 0 0
0 1 1 0 0
0 0 0 0 0
;run;
proc sql;
create table test02 as
select choice_num, count(*) as cnt
from (select a+b+c+d+e as choice_num from test01)
group by choice_num;
quit;