title: SQL for last six "full" 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 CloseTime &gt;= DATEADD(Month, DATEDIFF(Month, 0, DATEADD(m, - 6, CURRENT_TIMESTAMP)), 0)
  </code></pre>
  
  <p>This gets me data for the month I am starting this script + 6 last months. So e.g. if I run this script today, Ill get the data for this month + all previous months till April (04).</p>
  
  <p>Now I need to modify the condition so if I run the script today, the data will be obtained only for months 03-09 only, exluding days in this month (10).</p>
  
  <p>Any advice, please?</p>