title: How to identify different values in duplicate rows
body: <p>Considering that i have the following table: </p>
  
  <p><a href="https://i.stack.imgur.com/Q3yeX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q3yeX.png" alt="enter image description here"></a></p>
  
  <p>How i make a query that identify if the same <strong>code</strong> ( there can be duplicates, no problem with that at all ) have a diferent <strong>sex</strong>?</p>
  
  <p>Example: </p>
  
  <pre><code>Code   Sex
  1900   Male
  1900   Female
  </code></pre>
  
  <p>I tried to do a little reseach before questioning here, but couldn't find the solution. </p>
  
  <p>Thanks</p>