row_number 사용하시면 될듯합니다~
with 업체테이블 (업체코드, 업체명) as ( select 'C00001', '그린마일' union all select 'C00002', '이지세스' ), 결제테이블 (idx,업체코드,최근결제일,결제금액,다음결제일) as ( select 4, 'C00001', '2020-04-20', '50000' , '2020-05-20' union all select 3, 'C00001', '2020-03-20', '100000', '2020-04-20' union all select 2, 'C00002', '2020-01-10', '50000' , '2020-02-20' union all select 1, 'C00002', '2020-12-20', '100000', '2021-01-20' ) select 업체명, 최근결제일, 결제금액, 다음결제일 from (select 업체명, 최근결제일, 결제금액, 다음결제일, row_number() over (partition by 업체명 order by 최근결제일 desc) rn from 업체테이블 a, 결제테이블 b where a.업체코드 = b.업체코드) t where rn = 1