title: SQL: Pulling information based on two other columns
body: <p>Please bear with me, this is a little difficult to explain:
  Trying to find a way to pull names that contains "Op" in "Type" column, but the "Code" values must be unique with "Type" </p>
  
  <p>Such as: (Using the first 3 rows below)</p>
  
  <p>Do not pull first or second row, because "SPX" is related to both "Com" and "Op", but pull row #3 because "VPA" only has "Op" in column "Type". So the values under "code" column cannot be in both "Op" and "Com" under type for the each account. </p>
  
  <p><strong>Input"</strong></p>
  
  <pre><code>Name    Type    Code
  John    Com     SPX
  John    Op      SPX
  John    Op      VPA
  John    Op      SPX
  Matt    Op      SPX
  Matt    Op      SPX
  Jane    Com     SPX
  Jane    Com     SPR
  Jack    Op      SPR
  Jack    Op      SPX
  Jack    Com     SPR
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>Name    Type    Code
  John    Op      VPA
  Matt    Op      SPX
  Matt    Op      SPX
  Jack    Op      SPX
  </code></pre>
  
  <p>Would greatly appreciate any help!</p>
  
  <p>Thank you!</p>