title: Sql Query, query same table twice (possibly)
body: <p>I have a SQL query I am trying to write but haven't been able to come up with the solution.</p>
  
  <p>2 entries in my table that are related, are related through the first 3 characters of the ID. When a new item is added that needs to be related to a certain entry, the first 3 characters are added, and then the 2nd two are incremented by one to create the new ID. When a completely sepere entry is needed a unique 3 digit string is used and starts the second two chars with "00". There may be some that have large gaps in the last 2 columns because of deleted data (I don't want these in my query)</p>
  
  <p>What I would like to do is get only the rows where there is another row with the same first 3 characters and 1 less from the count of the last 2.</p>
  
  <p>Table Example:</p>
  
  <pre><code>ID    |  Date 
  ====== ========
  11100 | 07/12
  22211 | 07/13
  12300 | 07/14
  11101 | 07/14
  11400 | 07/16
  22212 | 07/16
  </code></pre>
  
  <p>The Query should only return these elements because there exsists another entry with the same first 3 chars and one less from the last 2 chars .</p>
  
  <pre><code>ID    |  Date 
  ====== ========
  11101 | 07/14
  22212 | 07/16
  </code></pre>