title: Select records that have same value in a column and different in another
body: <p>In my table <code>INVENTORY</code> there are 3 columns <code>varchar</code> code, version, description.
  e.g</p>
  
  <pre><code>code  || version || description
  --------------------------
  AS100 ||   01    || description
  AS100 ||   02    || description
  AS100 ||   02    || description
  AS100 ||   02    || description
  AS200 ||   01    || description
  AS300 ||   01    || description
  AS300 ||   01    || description
  </code></pre>
  
  <p>I want to select all those products that have the same product and multiple versions. In the above table, this query would returned:</p>
  
  <p><code>AS100</code> - <code>01</code> - <code>description</code><br/>
  <code>AS100</code> - <code>02</code> - <code>description</code><br/></p>
  
  <p>I tried to use <code>HAVING</code> statement but I don't get the above result..</p>
  
  <p>For example, I tried this:</p>
  
  <pre><code>SELECT code, version, Count(*) FROM INVENTORY
  GROUP BY version
  HAVING Count(*) =1
  </code></pre>
  
  <p>but it returns all the codes which appears once. </p>
  
  <p>I created an <a href="http://sqlfiddle.com/#!7/0a4e7/1" rel="nofollow noreferrer">SQLFIDDLE</a> here (I hope it plays, sometimes the page freezes)
  A small dump of my DB</p>
  
  <pre><code>CREATE TABLE "INVENTORY" (
      "code" VARCHAR, 
      "version" VARCHAR,
      "description" VARCHAR
  )
  
  
  INSERT INTO INVENTORY (code, version, description) VALUES("AS100", "01", "description");
  INSERT INTO INVENTORY (code, version, description) VALUES("AS100", "02", "description");
  INSERT INTO INVENTORY (code, version, description) VALUES("AS100", "02", "description");
  INSERT INTO INVENTORY (code, version, description) VALUES("AS100", "02", "description");
  INSERT INTO INVENTORY (code, version, description) VALUES("AS200", "02", "description");
  INSERT INTO INVENTORY (code, version, description) VALUES("AS300", "01", "description");
  INSERT INTO INVENTORY (code, version, description) VALUES("AS300", "01", "description");
  </code></pre>