PL-SQL query to find the most recent record the "Operation_date" of which is lower than a specified date
Analytic Functions
select
  col_id, amount
from
 (
   select
     d.col_id, d.amount,
     rank() over (partition by d.col_id order by d.operation_date desc) as rk
   from doc_amount_detail d
   where.d.operation_date &lt;= to_date('11/15/2020', 'mm/dd/yyyy')
 )
where rk = 1;