title: SQL for Fuzzy Match Deduplication
body: <p>Table A has records with duplicate entities with subtle string variations. There is no unique key that would uniquely identify an entity. Field "ID" identifies record inside the table, but not an entity itself.</p>
  
  <pre><code>    TABLE A
      --------------
      ID;SomeString
      1;something1
      2;something2
      3;something3
  </code></pre>
  
  <p>By using fuzzy match software, the table A is fuzzy matched against itself, in order to detect duplicate records. That's how lookup Table B is created, which has two columns: ID1 and ID2, representing IDs of matched records from Table A.</p>
  
  <pre><code>    TABLE B
      ---------
      ID1;ID2
      1;2
      1;3
      2;1
      2;3
      3;1
      3;2
  </code></pre>
  
  <p>The result of deduplication would be to delete records 2 and 3 from table A, so that only first record is retained.</p>
  
  <pre><code>    TABLE A
      --------------
      ID;SomeString
      1;something1
  </code></pre>
  
  <p>Is there a way to perform such fuzzy match deduplication of Table A through SQL, by using Table B as fuzzy match lookup table of identified duplicate records?
  To clarify, I'm not asking for a way to do the fuzzy match or identify duplicates, it's already done and results are in the table B. I'm asking how to perform deletion of duplicates (and retaining one record per identified duplicate records group), according to already identified duplicate record pairs (multiple duplicate record pairs per same entity).</p>