data have;
input height weight class $ id $;
cards;
156 51 Amber Chem101
156 52 Amber Math102
156 52 Amber Math102
167 54 Denise ENGL201
167 55 Denise ENGL201
145 56 Ginny CHEM101
145 57 Ginny ENGL201
145 58 Ginny MATH102
134 59 Lynn CHEM101
134 60 Lynn CHEM101
134 61 Lynn MATH102
178 62 Rick CHEM101
178 63 Rick HIST300
178 64 Rick HIST300
;
proc sql;
select class,sum(weight)/sum(height) as rate from have group by class;
quit;