title: Group by range of dates from date_start to date_end columns
body: <p>I have a table with following table structure:</p>
  <pre class="lang-text prettyprint-override"><code>place_id            date_start       date_end
  2826088480774       2017-09-19       2017-09-20
  1898375544837       2017-08-01       2017-08-03
  1425929142277       2017-09-23       2017-10-03
  1013612281863       2016-10-12       2016-10-14
  1795296329731       2016-10-13       2016-10-13
  695784701956        2017-09-11       2017-11-02
  </code></pre>
  <p>I want to count how many events (each row is an event) was in every place by each month. If event dates refer to several months, it should be counted for all affected months.</p>
  <p><code>place_id</code> could be repeated, so I did the following query:</p>
  <pre class="lang-sql prettyprint-override"><code>Select place_id, EXTRACT(MONTH FROM date_start) as 
  month, EXTRACT(YEAR FROM date_start) as year, 
  COUNT(*) as events
  From Table
  Group by place_id, year, month
  Order by month, year, events desc
  </code></pre>
  <p>So I get following grouped table:</p>
  <pre class="lang-text prettyprint-override"><code>place_id         month      year   events
  2826088480774       8       2017     345
  1898375544837       8       2017     343
  1425929142277       8       2017     344
  1013612281863       8       2017     355
  1795296329731       8       2017     348
  695784701956        8       2017     363
  </code></pre>
  <p>Problem is that data is grouped only by <code>start_date</code>, and its not clear for me how to distribute data by all affected months range from <code>date_start</code> to <code>date_end</code>.</p>