title: Find Latest record by date for each distinct column value
body: <p>I am working with a dataset with a similar format to the following:</p>
  
  <pre><code>Table: Account
  *-----------*----------*-------------*
  |     id    |  amount  |   date      |
  *-----------*----------*-------------*
  |      1    |   100    |  01/01/2016 |
  |      2    |   100    |  01/02/2016 |
  |      3    |   100    |  01/03/2016 |
  |      4    |   200    |  01/04/2016 |
  |      5    |   200    |  01/05/2016 |
  |      6    |   200    |  01/06/2016 |
  |      7    |   300    |  01/07/2016 |
  |      8    |   300    |  01/08/2016 |
  |      9    |   300    |  01/09/2016 |
  |     10    |   400    |  01/10/2016 |
  *-----------*----------*-------------*
  </code></pre>
  
  <p>I need a query to return that returns the most recent record for every distinct value in the table. So, the above table would return </p>
  
  <pre><code>*-----------*----------*-------------*
  |     id    |  amount  |   date      |
  *-----------*----------*-------------*
  |      3    |   100    |  01/03/2016 |
  |      6    |   200    |  01/06/2016 |
  |      9    |   300    |  01/09/2016 |
  |     10    |   400    |  01/10/2016 |
  *-----------*----------*-------------*
  </code></pre>
  
  <p>I am still new to subqueries but I tried the following</p>
  
  <pre><code>SELECT a.id, a.amount, a.date FROM account a WHERE a.date IN (SELECT MAX(date) FROM account)
  </code></pre>
  
  <p>However this only return the latest date. How can I get the latest date for every distinct value in the amount column. </p>