title: mysql SUM() in a WHERE clause
body: <p>I have points table with data as follows:</p>
  
  <pre><code>+----+---------+--------+
  | id | user_id | points |
  +----+---------+--------+
  |  1 |     1   |   10   |
  |  2 |     3   |    5   |
  |  3 |     1   |   12   |
  |  4 |     2   |   27   |
  |  5 |     1   |   14   |
  +----+---------+--------+
  </code></pre>
  
  <p>i need user-id's from above data those points sum is greater than 10</p>
  
  <p>like</p>
  
  <pre><code>+--------+
  | userid |
  +--------+
  |   1    |
  |   2    |
  +--------+
  </code></pre>