My intention here is to calculate two averages. 1. Before a certain dates and another 2. After certain dates. Using proc SQL in SAS. I have done this seperately and then merge. How can i simplify the code with just one Proc Sql step. Thank you. proc SQL;
create table AvgWindPressure as
select distinct MinPressure, avg(MaxwindMPH) as avgWind_before from work.Storm
where up_date < end_date
group by MinPressure, enddate;
quit;
proc SQL;
create table AvgWindpressure2 as
select distinct MinPressure, avg(MaxwindMPH) as avg_after
from MaxwindMPH
where up_date > enddate
group by MinPressure, enddate;
quit;
... View more