Hi,
I have the following table:
CREATE TABLE bidba.anomaly_mon_store
(
ds_time timestamp,
alert_cont smallint
)
and I want to update, preferably with one statement, the value of the aler_cont column with values of 1 and 2 according to the max and max-1 of the ds_time column:
pseudo code would be:
when max - 1 of ds_time -> alert_cont = 1
when max of ds_time -> alert_cont = 2