select *
from (select t1.hr_no,
t1.hr_date,
(row_number() over(order by t1.hr_date desc)) mm
from T_HR t1) t2
where mm <= 5
from (select t1.hr_no,
t1.hr_date,
(row_number() over(order by t1.hr_date desc)) mm
from T_HR t1) t2
where mm <= 5