title: [AWS Athena]: How to use DISTINCT with SELECT ALL, and ORDER BY
body: <p>I'm using AWS Athena, I have a query as such:</p>
  
  <pre><code>SELECT * FROM foo ORDER BY purchase_date ASC
  </code></pre>
  
  <p>But I want to de-dupe the records.</p>
  
  <p>Since this is Athena, and it needs to process records in parallel, I'm not sure how to write the DISTINCT clause.</p>
  
  <p>How can I make this query so that it doesn't have any duplicate records in the result set?</p>
  
  <p>Thanks</p>