Given the following scheme and values I want to compute the value of each row starting by adding 1 to the previous row value. If the row value is null then set null. If there is a value then add 1 from the previous value.
How can I achieve this in sql (postgresql)?
I’ve tried recursive CTE but without success.