Hi. maybe you need this.
data have;
input industry $ variable $ A B C;
cards;
0509 total 37 78 12
1315 freq 37 95 82
;
proc sql;
select coalescec(a.industry,b.industry) as industry,total_A,total_B,total_C,
freq_A,freq_B,freq_C
from
(
select industry,A as total_A,B as total_B,C as total_C
from have
where variable='total'
) as a
full join
(
select industry,A as freq_A,B as freq_B,C as freq_C
from have
where variable='freq'
) as b
on a.industry=b.industry;
quit;
... View more