Finding two most recent payments for every sale
A nice windowing function will do the job.

with phillovesCTEs as (
  select ARTRANSID, SALENO, PAIDDATE, DUEDATE, ACCTNO, 
         ROW_NUMBER() over (
                            group by SALENO 
                            order by PAIDDATE desc
                           ) as RN
  from ARTRANS 
)
select *
from phillovesCTEs
where RN &lt;=2;