title: get AVG() after GROUP BY in MYSQL
body: <p>I just start to learn MYSQL and meet a problem like this</p>
  <p>So the table is like this:</p>
  <pre><code>id  name  moneySpent 
  1   Alex    3
  2   Alex    1
  3   Bill    4
  4   Alex    2
  5   Alex    1
  6   Chris   5
  7   Chris   3
  </code></pre>
  <p>Lets say I wanna know the Average money spent per person. I try to do that by using SUM() GROUP BY and AVG() but I got stuck at AVG()</p>
  <pre><code>SELECT name, sum(moneySpent) AS total FROM table GROUP BY name;
  </code></pre>
  <p>then this will return</p>
  <pre><code>name  total
  Alex  7
  Bill  4
  Chris 8
  </code></pre>
  <p>Then how can I get a (7+4+8)/3 using AVG()?</p>