title: Count holiday days from start date for a year then every year
body: <p>HI  how would i go about counting days holiday taken  in one year from the employee start date then every consecutive after that. </p>
  
  <pre><code>Table 1 
  
  id  name    lastname     startdate      holidays
  
  1    jon     homes        2014-10-10      25
  </code></pre>
  
  <p>Holiday table will have all holidays taken</p>
  
  <pre><code>id   empid   date
  
  1       1    2014-12-20
  2       1    2014-12-21
  3       1    2014-12-22
  4       1    2015-10-01
  5       1    2015-10-02
  6       1    2015-10-11 (this would be a new year)
  </code></pre>
  
  <p>How can I query mysql to count holidays for  12 months form the employees start date  then do this every year in the future without hard coding the dates. </p>
  
  <p>I can understand how to do this in the current year</p>
  
  <pre><code>SELECT COUNT(*)
   FROM Holiday
   WHERE YEAR(date) = YEAR(CURDATE()) AND empid = 1; 
  </code></pre>
  
  <p>So how do i run the query from the startdate 2014-10-10  for 12  months  then for every year  (the next time the start date would be 2015-10-10 then 2016-10-10 etc.)</p>
  
  <p>Thanks</p>