title: Get multiple counts by 5 year increments
body: <p>This is my table: </p>
  
  <pre><code>   index_melanoma_yr    Total_Melanoma  Total_Virus
      2000                700              12
      2001                746              7
      2002                724              12
      2003                815              15
      2004                893              16
      2005                1020             22
  </code></pre>
  
  <p>I would like to count by 5 year increments. So, 2000-2004, 2005-2009, etc. I can hard code this, but since there are so many years, I'm wondering if there is a more efficient way. </p>
  
  <p>Here's how I got the initial counts: </p>
  
  <pre><code>    SELECT index_melanoma_yr,
             COUNT(DISTINCT PersonID) AS Total_Melanoma,
             SUM(   CASE
                WHEN index_virus_yr IS NOT NULL THEN
                    1
                ELSE
                    0
            END
                ) AS Total_Virus
      FROM Asare_ViralMelanoma_IndexDates
      GROUP BY index_melanoma_yr
      ORDER BY index_melanoma_yr 
  </code></pre>