Have you tried adding this to the ON clause for the table "h" join criteria?
inner join (select accountid,opportunityid,max(modifydate) as MaxDT from saleslogix.sysdba.Opportunity
group by AccountID,opportunityID) H
ON h.accountid = b.accountid
and not (h.opportunityid = b.opportunityid and h.MaxDt > b.modifydate)
Be One with the Optimizer
TG