I have a Employee_info table and it contains employee_id and date.
date ex:20-03-2016,
01-01-2016,
01-01-2017,
09-04-2021,
25-07-2021 etc.
I want write a SQL select query which contain id,future_date and past_date columns.
future_date: iterate these dates by adding 365 days until it reaches date>sysdate in one column .
past_date: subtract the date by -365days.
It is about some kind of a row generator. For example, with two sample rows
Query begins here: