非常谢谢上面几位,我自己用比较初级的做出来了
data aa(drop=sale type tiaoshu);
set weigui.xundyue1;
if type='t1' then t1=sale;
if type='t2' then t2=sale;
if type='t3' then t3=sale;if type='t4' then t4=sale;if type='t5' then t5=sale;
run;
proc sql;
create table aa1 as
select name,code,year,month,day,sum(t1) as t1,sum(t2) as t2,sum(t3) as t3,sum(t4) as t4,sum(t5) as t5 from aa
group by name,code,year,month,day
order by year, month ,day ,code;
quit;