select BOOKMARK_ID,SCANED_TIME from (
select BOOKMARK_ID, SCANED_TIME, row_number() over(partition by BOOKMARK_TYPE order by SCANED_TIME asc ) ST from SNSEC_BMARK_SCANED_BARCODE
where BOOKMARK_TYPE IN('001','002') and CUSTOMER_ID =111111 and BOOKMARK_STATUS = 1
) where ST =1