title: MySQL count occurrences greater than 2
body: <p>I have the following table structure</p>
  
  <pre><code>+  id  +  word  +
  +------+--------+
  </code></pre>
  
  <p>The table gets filled with the words in lower cas of a given text, so the text</p>
  
  <p>Hello bye hello</p>
  
  <p>would result in</p>
  
  <pre><code>+  id  +  word  +
  +------+--------+
  +   1  + hello  +
  +------+--------+
  +   2  + bye    +
  +------+--------+
  +   3  + hello  +
  +------+--------+
  </code></pre>
  
  <p>I want to make a SELECT query that will return the number of words that get repeated at least two times in the table (like hello)</p>
  
  <pre><code>SELECT COUNT(id) FROM words WHERE (SELECT COUNT(words.word))&gt;1
  </code></pre>
  
  <p>which of course is so wrong and super overloading when table is big. Any idea on how to achieve such purpose? In the given example inhere-above, I would expect 1</p>