[sql] SQL QUERY replace NULL value in a row with a value from the previous known value