I have a table like this:
ID BEGIN END
If there are overlapping episodes for the same ID (like 2000-01-01 - 2001-1
I'm not making full sense of your question, but I'm absolutely certain that you need to look into the lead()/lag() window functions.
Something like this, for instance, will be a good starting point to place in a subquery or a common table expression, in order to identify whether rows overlap or not per id:
select id,
lag(start) over w as prev_start,
lag(end) over w as prev_end,
start,
end,
lead(start) over w as next_start,
lead(end) over w as next_end
from yourtable
window w as (
partition by id
order by start, end
)