title: MySQL Average of column where there are greater than 5 rows
body: <p>Is there any way to use MySQL to only return an average if there are more than X rows?</p>
  
  <p>I am currently using the following query:</p>
  
  <pre><code>SELECT round(AVG(a_points),1) as a from points where user_id=X
  </code></pre>
  
  <p>Can this be done in MySQL or do I have to do a row count first then execute this statement?</p>
  
  <p>The table contains </p>
  
  <pre><code>user_id     a_points     b_points
  </code></pre>
  
  <p>So a user could have lots of b_points but only 4 a_points and I wouldn't want to average at that point.  </p>