select a.*,b.id,b.tax,b.paydate from b b1,a
where paydate=(select max(paydate) from b where personid=b1.personid)
and a.personid=b1.personid
where paydate=(select max(paydate) from b where personid=b1.personid)
and a.personid=b1.personid
select a.*,b1.id,b1.tax,b1.paydate from b b1,a
where paydate=(select max(paydate) from b where personid=b1.personid)
and a.personid=b1.personid
where paydate=(select max(paydate) from b b1 where b.personid=b1.personid)