title: SQL Last 6 Months
body: <p>I have table containing one datetime column. I need to return rows for only last 6 months. This can be done by </p>
  
  <pre><code>where datetime_column &gt; DATEADD(m, -6, current_timestamp)
  </code></pre>
  
  <p>But how to extend this option if I want to return latest month beginning with first day of the month? E.g. I run this condition in the middle of month <code>(14/6/2000)</code>, the latest row is set to <code>14/1/2000</code>, but i would like to return it as <code>1/1/2000</code>. Any advice?</p>
  
  <p>I tried some subqueries (max function of datetime including month function) but with no success.</p>