title: How to select only duplicate values, but with one different column?
body: <p>I have a table, which looks like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Aircraft</th>
  <th>WorkOrder</th>
  <th>EngOrder</th>
  <th>Description</th>
  <th>PartNo</th>
  <th>InstPosition</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>KHB</td>
  <td>21</td>
  <td>45</td>
  <td>engine 1</td>
  <td>pw123</td>
  <td>E1</td>
  </tr>
  <tr>
  <td>KHB</td>
  <td>21</td>
  <td>45</td>
  <td>engine 4</td>
  <td>pw123</td>
  <td>E2</td>
  </tr>
  <tr>
  <td>KHB</td>
  <td>22</td>
  <td>45</td>
  <td>engine 2</td>
  <td>pw122</td>
  <td>E1</td>
  </tr>
  <tr>
  <td>KBG</td>
  <td>31</td>
  <td>55</td>
  <td>rotor engine</td>
  <td>v123</td>
  <td>E2</td>
  </tr>
  <tr>
  <td>KBG</td>
  <td>36</td>
  <td>51</td>
  <td>engine 9</td>
  <td>v156</td>
  <td>E1</td>
  </tr>
  <tr>
  <td>KBG</td>
  <td>31</td>
  <td>55</td>
  <td>engine comp</td>
  <td>v123</td>
  <td>E1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I need to select only rows which are similar in <strong>WorkOrder, EngOrder and PartNO</strong>, but different in <strong>InstPosition</strong>. My resulting table should look like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Aircraft</th>
  <th>WorkOrder</th>
  <th>EngOrder</th>
  <th>Description</th>
  <th>PartNo</th>
  <th>InstPosition</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>KHB</td>
  <td>21</td>
  <td>45</td>
  <td>engine 1</td>
  <td>pw123</td>
  <td>E1</td>
  </tr>
  <tr>
  <td>KHB</td>
  <td>21</td>
  <td>45</td>
  <td>engine 4</td>
  <td>pw123</td>
  <td>E2</td>
  </tr>
  <tr>
  <td>KBG</td>
  <td>31</td>
  <td>55</td>
  <td>rotor engine</td>
  <td>v123</td>
  <td>E2</td>
  </tr>
  <tr>
  <td>KBG</td>
  <td>31</td>
  <td>55</td>
  <td>engine comp</td>
  <td>v123</td>
  <td>E1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I tried to use self join, but it returns empty table:</p>
  <pre><code>SELECT a.* 
  FROM table a
  INNER JOIN b ON a.WorkOrder = b.WorkOrder 
         AND a.EngOrder = b.EngOrder 
         AND a.PartNO = b.PartNO
         AND a.InstPosition != b.InstPosition ```
  
  
  </code></pre>