I am new to postgres.
I have fields(title) as below:
Title Date1 Date2 Date3 Date4 Date5 Date6
Vaccine1 01/08/1980 01/08/1981 01/08/1982 01/08/1983 Null Null
I have a situation at work where I need to find out the first null value. In the case above, it should be Date5 based on the title. I have some other conditions which need to be checked. But this would be in my main case.
I am trying to do something as below:
case
when title ='AAA'
and
??
I am stuck right there.
Any help is appreciated. Thanks.