title: Getting an Average from counting Rows in MySQL
body: <p>I am trying to display an average (percentile) of good answers from a DB for users that have > 99 answers given, whereas in column 'answer': 1=good answer and -1=bad answer...</p>
  
  <p>The problem by using SUM is that 1 +-1 = 0 so technically if someone has 5 good answers and 5 bad answers, the query below gives me 0% when I should be getting 50%</p>
  
  <pre><code>SELECT 
    user_id, 
    CONCAT(ROUND( (SUM( `answer` ) / COUNT( `answer` ))*100 ,2 ),'%')  AS totals
  FROM myDB
  WHERE answer &lt;&gt;0
  GROUP BY user_id
  HAVING COUNT( `answer` ) &gt;99
  ORDER BY totals DESC 
  </code></pre>
  
  <p>How would I make this work?</p>