因为学历的名字没有规则,对学历编码,然后排序进行可以了。
data t;
input education $ num;
cards;
本科 128
大专 153
硕士 9
博士 22
合计 312
;
run;
proc sql;
create table t1
as
select *
from t
order by case when education='大专' then 1
when education='本科' then 2
when education='硕士' then 3
when education='博士' then 4
when education='合计' then 5
end;
run;