proc sql;
create table wanted as
select a.g, a.a, b.b
from a a left join
(select distinct g,max(a) as a,b from a where b ne '' group by 1) b
on a.g=b.g and a.a=b.a;
quit;
proc sql;
create table wanted as
select a.g, a.a, b.b
from a a left join
(select distinct g,max(a) as a,b from a where b ne '' group by 1) b
on a.g=b.g and a.a=b.a;
quit;