Hey! I'm not the best programmer, nor I've ever post something here as a student. I need help by a little task I've got at work. I should use the data step for creating a table "durchschnitt2" with the MIN, MAX and AVG für every numeric value for each sex (M and F) using the SASHELP.CLASS. I already sovled the task by using the proc SQL. This is the code: proc sql; create table durchschnitt1 as select sex, min(age) as age_min, max(age) as age_max, avg(age) as age_avg format=commax10.2, min(height) as height_min format=commax10.2, max(height) as height_max format=commax10.2, avg(height) as height_avg format=commax10.2, min(weight) as weight_min format=commax10.2, max(weight) as weight_max format=commax10.2, avg(weight) as weight_avg format=commax10.2 from sashelp.class group by sex; run; How should I do this in a data step? Thank your for helping.
... View more