title: Returning distinct values from SQL with BLOB columns and Inner Joins
body: <p>I need to return distinct records from 2 tables. The problem is one of the columns is a blob and I also need it for reconstructing the file.
  I saw some solutions but in none of them the original query(without the distinct) included a inner join.
  Here's my query</p>
  
  <pre><code>SELECT dop.DSC_DOCUMENTO, adp.NOM_ARQUIVO_ANEXO,adp.CON_ARQUIVO_ANEXO
    FROM documento_os_pe dop
    JOIN anexo_documento_pe adp 
      ON dop.NUM_SEQUENCIAL_DOCUMENTO = adp.NUM_SEQUENCIAL_DOCUMENTO
    WHERE dop.ind_anexo = 'Y' AND DOP.NUM_PE = 54 
    ORDER BY dop.NUM_OS DESC;
  </code></pre>