title: Self-join in Oracle SQL - selecting rows based on 1 same column and 1 different column
body: <p>It may not be a self-join I need, but I'm having difficulty with this problem and I hope someone can help me.  </p>
  
  <p>Sample Data:</p>
  
  <pre><code>Row   Code   ReservationID   ClientID EmployeeID
  1     T            123          7777     John 
  2     T            456          2020     John
  3     P            456          2020     John
  4     P            999          3100     Steve
  5     P            876          3100     Steve
  6     T            333          2424     John
  7     P            333          2424     Lynda
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>Row   Code   ReservationID   ClientID EmployeeID
  2     T            456          2020     John
  3     P            456          2020     John
  6     T            333          2424     John
  7     P            333          2424     Lynda
  </code></pre>
  
  <p>I'm looking for a query that will only return Rows 2, 3, 6, and 7.</p>
  
  <p>The selection criteria is when there is a row with Code = T and another row with Code = P but for the same Reservation ID and CLientID.  The EmployeeID may be the same or different (I want to return the EmployeeID in the results but not use it in the select criteria).  </p>
  
  <p>Reading forums I think I need a self-join (which I don't know how to do).  Any help you can offer would really be appreciated!  Thanks! </p>