title: MySQL Fill in missing dates between two dates for a given status
body: <p>I have a data set of projects.  The projects change status from beginning to end, and the date of the status change is logged in a table (table is named "events" - not my choice).  Would look like this (simplified):</p>
  
  <pre><code>Date        Status
  2015-06-01  Start
  2015-06-03  Stage 2
  2015-06-07  Stage 3
  </code></pre>
  
  <p>In any given date range (to be determined dynamically) I want to be able to see which projects are at which status.  However, using BETWEEN or other query against the data will only pull those projects whose status <em>changed</em> during that period, not the ones that are still at a given status.</p>
  
  <p>I've currently created a very clunky solution in Excel which copies rows into new rows between status change dates, like so:</p>
  
  <pre><code>Date          Status  
  2015-06-01    Project start
  2015-06-02    Project start (copied)
  2015-06-03    Stage 2 
  2015-06-04    Stage 2 (copied)
  2015-06-05    Stage 2 (copied)
  2015-06-06    Stage 2 (copied)
  2015-06-07    Stage 3
  </code></pre>
  
  <p>This solution allows me to query the status for the project on, say, 2015-06-06 and see that it is still at Stage 2.</p>
  
  <p>Is there some way I can use mySql to pull this same data, but as output to a query?  I've heard some suggest to use a Calendar table, but I'm not sure how that would work.  I've also seen someone recommend a Cross Join, but again, I couldn't understand from the description how that would work.</p>
  
  <p>Thanks in advance for your help!</p>