What does this have to do with BI? Also, please post test data in the form of a datastep, as such this code is untested:
proc sql;
create table want as
select a.id,
a.date,
b.date as last_date
from tablea a
left join (select id,
max(date) as date
from tableb
group by id) b
on a.id=b.id;
quit;
What does this have to do with BI? Also, please post test data in the form of a datastep, as such this code is untested:
proc sql;
create table want as
select a.id,
a.date,
b.date as last_date
from tablea a
left join (select id,
max(date) as date
from tableb
group by id) b
on a.id=b.id;
quit;
You posted the question in the BI forum, but I didn't see anything relating to BI specifically. If so I can move to the general SAS questions area.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!