Hello I am new in SQL developer .Can you help me create condition in sql. I have date in first column but i need create numbers in second columns. First number in second columns have to be zero but next data between first number and first number +90 have to be one.
the first number on the first date must be 0. if the date between the first date and the first date is +90 then it is 1 if it is higher than 0, the third date is 0 because it is more than the first date +90, the fourth date is 0 because it is more than the third date +90 and the fifth date is 1 because between the fourth date and the fourth date it is +90
Thank you so much.
date | condition |
---|---|
15.1.2020 | 0 |
14.2.2020 | 1 |
16.4.2020 | 0 |
4.9.2020 | 0 |
4.11.2020 | 1 |