title: Group values by date in a generated timeseries
body: <p>I have a table called 'daily_budgets':</p>
  
  <pre><code>+----+------------+----------+--------------+
  | id | start_date | end_date | daily_budget |
  +----+------------+----------+--------------+
  | 1  | 25/04/18   | 29/04/18 | 500          |
  +----+------------+----------+--------------+
  | 2  | 26/04/18   | 27/04/18 | 1000         |
  +----+------------+----------+--------------+
  </code></pre>
  
  <p>that shows the daily budget that an item has between a designated timeframe (start_date - end_date).</p>
  
  <p>Then I have another one called 'year_2018' where I have generated a time_series with all the dates for 2018:</p>
  
  <pre><code>+----------+
  | date     |
  +----------+
  | 01/01/18 |
  +----------+
  | 02/01/18 |
  +----------+
  | 03/01/18 |
  +----------+
  | 04/01/18 |
  +----------+
  | 05/01/18 |
  +----------+
  etc.
  </code></pre>
  
  <p>Now I just want to join those two tables so that I get total daily_budget grouped by date. The first date in that resulting table should be the minimum start_date that there is in table 'daily_budgets'.</p>
  
  <pre><code>+----------+--------------+
  | date     | daily_budget |
  +----------+--------------+
  | 25/04/18 | 500          |
  +----------+--------------+
  | 26/04/18 | 1500         |
  +----------+--------------+
  | 27/04/18 | 1500         |
  +----------+--------------+
  | 28/04/18 | 500          |
  +----------+--------------+
  | 29/04/18 | 500          |
  +----------+--------------+
  </code></pre>
  
  <p>Thanks very much for the help!</p>
  
  <p>I am using: PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.2058</p>