title: How to find last item by parameter (SQL)?
body: <p>I have a query to search for some itens in a history. Ex:</p>
  <pre><code>SELECT * FROM HISTORY WHERE DOCUMENT IN ('DOC1','DOC2','DOC3') ORDER BY DOC ASC, CREATION_DATE DESC;
  </code></pre>
  <p>This query return me a list like this:</p>
  <pre><code>ID | DOC | CREATIONDATE
  
  6  | DOC1 | 12/12/2022
  
  3  | DOC1 | 11/11/2022
  
  5  | DOC2 | 12/12/2022
  
  2  | DOC2 | 11/11/2022
  
  4  | DOC3 | 12/12/2022
  
  1  | DOC3 | 11/11/2022
  </code></pre>
  <p>But I want just the most recent item by doc. For example:</p>
  <pre><code>ID | DOC | CREATIONDATE
  
  6  | DOC1 | 12/12/2022
  
  5  | DOC2 | 12/12/2022
  
  4  | DOC3 | 12/12/2022
  </code></pre>
  <p>I dont want the old itens. Just last item inserted by document. Someone can help me?</p>