title: SQL query to get value having multiple in the same table in SQL Server
body: <p>Let's say I have a table with many columns like <code>col1, col2, col3, id, variantId, col4, col5</code> etc</p>
  
  <p>However I am only interested in <code>id, variantId</code> which look like this:</p>
  
  <pre><code>+----------+-----------+
  | id       | variantId |
  +----------+-----------+
  | a        | 11        |
  | a        | 12        | 
  | b        | 31        | 
  | c        | 41        |
  | c        | 54        | 
  | d        | abc       | 
  | e        | xyz       | 
  | e        | xyz       | 
  +----------+-----------+
  </code></pre>
  
  <p>I need distinct ids which having count of distinct variantId more than once
  In this case I would only get a and c</p>