title: recurcive CTE how to use it
body: <p>I want to create a recursive cte by passing a date through it until it reaches final date. Can anyone show me an example of how to do it</p>
  
  <p>I need to pass a starting date and a final date and make a count of how many students there were in every year!</p>
  
  <p>where :date and :finaldate is an input</p>
  
  <pre><code> with seventeen as 
  (
      select  count(studentid)
      from students s
      join periodrange p on p.idx = s.periodrangeidx
      where p.validdate between :date and :finaldate
  )
  </code></pre>
  
  <p>I want to have the sum of the students for each year</p>
  
  <p>Would something like this even work or did i dream to far for recrusive CTE</p>