title: Calculating Percentage within a MYSQL Group
body: <p>My query calculates the total numbers of calls within SLA by priority. However now I need to work out the percentage of calls that were within SLA by priority within the same statement</p>
  
  <p>However I am unsure how to do this within my current statement</p>
  
  <pre><code>`SELECT
   SUM(o.withinfix) 'Total'
   ,o.priority 'priority'
   FROM opencall o
   WHERE LEFT(FROM_UNIXTIME(o.logdatex),4) = "2013"
   AND o.fk_company_id = "abc"
   GROUP BY o.priority'
  </code></pre>
  
  <p>Can anyone help, I using MYSQL 5.1</p>
  
  <p>Thanks</p>