Hi SAS Users.
I have a code below to create the table work.industry_mtbv
proc sql;
create table work.industry_mtbv as
select year, INDC3,
median(wMAR_TO_BOO) as median_mtbv
from canus
group by INDC3,year
;
quit;
This means that median_mtbv will be calculated for each INDC3( industry) each year.
I want to add one more condition that: if INDC3 in ('NA', 'UNCLS', 'UQESQ') then median_mtbv=. (setting missing for median_mtbv if INDC3 is one of these three industries)
Can you please suggest to me how can I adjust the proc SQL above to add this condition?
Warmest regards.
Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.