title: Limit number of occurances in output group-by sql query
body: <p>I have this query</p>
  
  <pre><code>select rep, companyname,count(companyname) as [count], Commission from customers
  group by repid,companyname,Commission
  </code></pre>
  
  <p>It returns lets say</p>
  
  <pre><code>rep    companyname     count    commision
  1       ABC              1        10%
  2       XYZ              2        10%
  2       XYZ              1        20%
  3       JKL              4        10%
  3       JKL              1        30%
  </code></pre>
  
  <p>Desire output is</p>
  
  <pre><code>rep    companyname     count    commision
  2       XYZ              2        10%
  2       XYZ              1        20%
  3       JKL              4        10%
  3       JKL              1        30%
  </code></pre>
  
  <p>I would like to have an output so that I show the only those companies who are repeated twice or more in the result. How do I modify the above query. I made the query simple (remove where clause). </p>