Relative Content

Tag Archive for sqlpostgresqldml

How to fill in ALL empty values in postgreSQL till the next not empty cell?

I have a table “orders” in postgres with columns “offer_id” and “date”. I need to write a code which must fill in all empty cases in column “offer_id”, using the previous results. I try to use “lag” function but the problem is that it only manages with one single NULL but not several. How to fix that?