title: SQL: Distinct count in where clause?
body: <p>My order table looks like this: </p>
  
  <pre><code>id   fk_customer
  1    34
  2    34
  3    34
  4    7
  5    7
  6    8
  </code></pre>
  
  <p>I would like to select only those customers who have more than 2 orders. </p>
  
  <p>This doesnt work however: </p>
  
  <p><code>SELECT * FROM order WHERE COUNT DISTINCT fk_customer &gt; 2</code></p>
  
  <p>Please advice!</p>
  
  <p>thanks</p>