title: Percentage in Case statement
body: <p>I have a query below that works but I want to add a column showing the percentage of each of those numbers. Can you help me?</p>
  
  <pre><code>select
      count(case when Lunchstatus = 'P'   then 1 else null end) as Paid
    , count(case when LunchStatus = 'R'   then 1 else null end) as Reduced
    , count(case when LunchStatus = 'F'   then 1 else null end) as Free
    , count(case when LunchStatus = 'fdc' then 1 else null end) as CertifiedFree
    , count(case when LunchStatus = 'P'   then 1 
                 when LunchStatus = 'fdc' then 1 
                 when LunchStatus = 'R'   then 1 
                 when LunchStatus = 'F'   then 1 
                 else null 
                 end) as Total
  from students
  where enroll_status = 0 
    and schoolid = %param1%
  </code></pre>
  
  <p>Thank you</p>