What SAS version. Mine is 9.4 (TS1M8) and I do not see difference.
Update: Problem Note 66896: Inconsistent results are generated with the PROC SQL Median summary function
proc sql;
select Name,Sex,Height,median(Height) as Med_Height,mean(Height) as Mean_Height
from sashelp.class
group by sex
having sex="M";
quit;
proc means data=sashelp.class n median mean;
class sex;
var height;
run;
proc sql;
select Sex, median(Height) as Med_Height, mean(Height) as Mean_Height
from sashelp.class
group by sex
having sex="M";
quit;
... View more