-- Тестовая выборка
with t as (select to_date('2024-09-17 11:52:17', 'yyyy-mm-dd hh24:mi:ss') begin_date, to_date('2024-12-17 11:52:17', 'yyyy-mm-dd hh24:mi:ss') end_date, 3 Cnt from dual union
select to_date('2024-06-10 14:52:19', 'yyyy-mm-dd hh24:mi:ss') begin_date, to_date('2024-07-10 14:52:19', 'yyyy-mm-dd hh24:mi:ss') end_date, 1 Cnt from dual)
-- Иерархический запрос
select distinct T.*,
add_Months(T.Begin_Date, Level - 1) as Current_Date, -- отсчет месяцев
Level as Current_Val -- текущее значение отсчета
from T
CONNECT BY add_Months(T.Begin_Date, Level) <= T.End_Date
order siblings by T.Begin_Date desc