title: MySQL (now() - Interval 1 Month) for this year only
body: <p>I need some help with this.</p>
  
  <p>I have the following SQL statement</p>
  
  <pre><code>SELECT * FROM table 
  WHERE MONTH(ORDERDATE) = MONTH(NOW() - INTERVAL 1 MONTH)
  </code></pre>
  
  <p>The problem is that it is returning data from last month but for all years...  Am I doing something wrong or is this a normal issue that people face with this function?  </p>
  
  <p>The problem I am facing is that if I use the YEAR(NOW()) the report I am writing will not show the data for 2016 when we hit 2017.  I'm trying to write a 6 month sales history report.</p>
  
  <p>Any guidance would be appreciated.</p>
  
  <p>Added Information</p>
  
  <pre><code>SELECT * FROM DATA_WH.SALESORD_HDR WHERE MONTH(ORDERDATE) = MONTH(NOW() - INTERVAL 1 MONTH)
  </code></pre>
  
  <p>RETURNS....</p>
  
  <p>'2015-08-14 00:00:00'</p>