select a.* from table a
inner join
(select accountid, max(recordDate) as latestdate from table
group by accountid) b on a.accountid = b.accountid and
a.recorddate = b.latestdate
inner join
(select accountid, max(recordDate) as latestdate from table
group by accountid) b on a.accountid = b.accountid and
a.recorddate = b.latestdate