title: MySQL query, Most recent values from a historical table of values
body: <p>I have a table with historical values. Every time one of the value is updated a copy of that value is added to this table indexed by "request_id" </p>
  
  <p>I am looking for away to get the most updated values for each "request_id" without having to retrieve the entire table. </p>
  
  <p><strong>Current table:</strong> </p>
  
  <pre><code>ID | Modified | request_id | value 
  -------------------------------------
   1 |       10 |          1 | "one"
   2 |       15 |          1 | "two"
   3 |       15 |          2 | "three"
   4 |       18 |          1 | "fore"
   5 |       25 |          3 | "five"
   6 |       36 |          1 | "six"
  </code></pre>
  
  <p><strong>Result table</strong></p>
  
  <pre><code>ID | Modified | request_id | value 
  -------------------------------------
   3 |       15 |          2 | "three"
   5 |       25 |          3 | "five"
   6 |       36 |          1 | "six"
  </code></pre>
  
  <p>I am using PHP and SQLite if it makes any difference. </p>