Хммм.,,Вот один из способов, который проверяет наличие трех последовательных месяцев, а затем возвращает сумму:
select user, month, month_2, value_3
from (select t.*,
lead(month, 2) over (partition by user order by month) as month_2,
(sum(value) +
lead(value) over (partition by user order by month) +
lead(value, 2) over (partition by user order by month)
) as value_3
from t
) t
where month_2 = add_months(month, 2);