I am using Postgres and I am trying to wrap my head around on how exactly I could derive the first start date in continuous date spans. For example :-
ID | Start Date | End Date
==========================
1|2020-01-01|2020-01-31
1|2020-02-01|2020-03-31
1|2020-05-01|2020-06-30
1|2020-07-01|2020-07-31
1|2020-08-01|2020-08-31
The output I am expecting is
ID | Start Date | End Date | Continous Date
===========================================
1|2020-01-01|2020-01-31|2020-01-01
1|2020-02-01|2020-03-31|2020-01-01
1|2020-05-01|2020-06-30|2020-05-01
1|2020-07-01|2020-07-31|2020-05-01
1|2020-08-01|2020-08-31|2020-05-01
Basically it should give me the the very first start date of a continuous date span.
Appreciate your inputs or directions on how i could go about this. CTE's unfortunately is something which I might not be able to go with.