title: updates in month and day differences
body: <p>I have a table as shown below:</p>
  
  <p><img src="https://i.stack.imgur.com/IlEF1.png" alt="enter image description here"></p>
  
  <p>Note: the MAX last_orderdate is 20131015 and the format is yyyymmdd. </p>
  
  <p>I would like to show the final result looks like below:</p>
  
  <p><img src="https://i.stack.imgur.com/g99m5.png" alt="enter image description here"></p>
  
  <p>Is there any query to help me in this as I have 200000 plus records.</p>
  
  <p>Thank you very much for spending your time to look at my question.</p>