My question is about the select statement and its usage. Following is the code used to calculate average, i copied it from base sas codes avaiable online to understand function but can't understand why does it have "e. and d.". and what does it mean to say "class e class d", Also need to understand the calcuation highlighted [in bold]. Step 1 : Creating Data set data class; set sashelp.class; obs = _n_; run; Step 2 : Proc Sql proc sql; select avg(weight) as Median from (select e.weight from class e, class d group by e.weight having sum(case when e.weight = d.weight then 1 else 0 end) >= abs(sum(sign(e.weight - d.weight)))); quit; Thanks !
... View more