title: SQL How To Group by Date Ranges
body: <p>Can someone help me figure out to group by a range of dates??</p>
  
  <p>Right now I have query similar to this</p>
  
  <pre><code>    Select date, count(x)
      from data
      group by date
  </code></pre>
  
  <p>This returns results that look like this</p>
  
  <pre><code>    2011/1/1   10
      2011/1/2   5
      2011/1/3   8
      2011/1/4   3
  </code></pre>
  
  <p>etc...</p>
  
  <p>But I would like to count every 2 days so that the data would look like this</p>
  
  <pre><code>    2011/1/1   15
      2011/1/3   11
  </code></pre>
  
  <p>Any ideas??</p>
  
  <p>Thanks</p>