title: Sum of numbers from previous year month until this years month in SQL
body: <p>Being a beginner, I'm having a hard time coding this particular scenario in SQL Server 2008</p>
  
  <p><a href="https://i.stack.imgur.com/uVS7y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uVS7y.png" alt="enter image description here"></a></p>
  
  <p>As you can see, 
  The SUM column for July 2017 for example is equal to the following:
  August to Dec 2016 + Jan to July 2017 = 4625</p>
  
  <p>Similarly, the SUM column for August 2017 is equal to the following:
  Sep to Dec 2016 + Jan to August 2017 = 4625</p>
  
  <p><a href="https://i.stack.imgur.com/KYciN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KYciN.png" alt="enter image description here"></a></p>
  
  <p>How can I automate this from month to month?</p>
  
  <p>I appreciate any help I can get. Trying to code this in SQL Server 2008</p>