title: To get the Year of the previous month in SQL
body: <p>I'm trying to get the year of the previous month.</p>
  
  <p>For example in July 2017 I want result 2017. But in January 2017 I want result 2016 and in Feb 2017 I want result 2017. Using SQL Server.</p>