title: MySQL Calculating percentage of two aliases
body: <p>I have managed to count what i needed and now im wondering how i could present the percantage ratio of two aliases.</p>
  
  <pre><code>SELECT c.fullname, COUNT( DISTINCT cc.userid ) AS  'calc1', COUNT( DISTINCT sst.id ) AS  'calc2'
  FROM mdl_course c
  INNER JOIN mdl_course_completions cc ON c.id = cc.course
  INNER JOIN mdl_scorm s ON s.course = c.id
  INNER JOIN mdl_scorm_scoes_track sst ON s.id = sst.scormid
  INNER JOIN mdl_user u ON u.id = sst.userid
  WHERE timecompleted IS NOT NULL 
  AND sst.element =  'x.start.time'
  GROUP BY c.fullname
  ORDER BY  `calc2` DESC  
  </code></pre>
  
  <p>I've tried <code>concat(round(( SELECT('Calc1')/SELECT('Calc2') * 100 ),2),'%') AS percentage</code>
  but it doesnt work</p>
  
  <p>Query representation</p>
  
  <pre><code>fullname  calc1 calc2
  Something1  29    92
  Something2  16    81
  Something3  30    75
  </code></pre>