title: SQL - select rows that have the same value in two columns
body: <p>The solution to the topic is evading me.</p>
  
  <p>I have a table looking like (beyond other fields that have nothing to do with my question):</p>
  
  <p>NAME,CARDNUMBER,MEMBERTYPE</p>
  
  <p>Now, I want a view that shows rows where the cardnumber AND membertype is identical. Both of these fields are integers. Name is VARCHAR.  Name is not unique, and duplicate cardnumber, membertype should show for the same name, as well.</p>
  
  <p>I.e. if the following was the table:</p>
  
  <pre><code>JOHN       | 324   | 2
  PETER      | 642   | 1
  MARK       | 324   | 2
  DIANNA     | 753   | 2
  SPIDERMAN  | 642   | 1
  JAMIE FOXX | 235   | 6
  </code></pre>
  
  <p>I would want:</p>
  
  <pre><code>JOHN       | 324   | 2
  MARK       | 324   | 2
  PETER      | 642   | 1
  SPIDERMAN  | 642   | 1
  </code></pre>
  
  <p>this could just be sorted by cardnumber to make it useful to humans.</p>
  
  <p>What's the most efficient way of doing this?</p>