title: Select a sequence between two numbers on MySQL
body: <p>I have this table named <code>people</code> with two dates on MySQL:</p>
  
  <pre><code>| Name | start_date | end_date   |
  | John | 2007-03-01 | 2009-10-12 |
  | Mike | 2001-06-06 | 2010-12-01 |
  </code></pre>
  
  <p>I want to create a view that lets me search by activity year, being <em>activity year</em> any year between the <code>start_date</code> and the <code>end_date</code>. So, I'd like to get a field with a sequence of years, like this:</p>
  
  <pre><code>| Name | activity_years                                    |
  | John | 2007,2008,2009                                    |
  | Mike | 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 |
  </code></pre>
  
  <p>I've tried some approaches, but I can't get it. Since I want to create a view, I have to do it everything inside a SELECT statement and that is giving me some headache.</p>