@kindbe17 wrote:
Hi everyone, could you please help me to use proc sql, create new variables (not macro) that will keep N, Mean, STD, Median, Min, Max of SALARY by LEAGUEs from sashelp.BASEBALL dataset.
i tried this but seems i should have not use proc means;
Why not? From the SQL you show I would think that:
proc means data=sashelp.baseball;
output out=baseball_1 (drop=_type_ _freq_)
N=N Mean=Mean STD=STD Median=Median Min=Min Max=Max
;
class league;
var salary;
run;
Would be sufficient.
If you don't actually want the total row for all leagues then add NWAY to the Proc Means statement.
... View more