title: Select with IN, filtering the matched results
body: <p>What I want to perform is:</p>
  
  <p>Select some rows from a table using IN, but while my query matches the rows, I need it to match those which has the latest update_date.</p>
  
  <p>More explanation:</p>
  
  <p>So we have this table</p>
  
  <pre><code>id  update_date value   record_id
  1   2015-01-01  1       1
  2   2015-01-02  2       1
  3   2015-01-03  3       1
  4   2015-02-02  100     2
  5   2015-02-03  101     2
  </code></pre>
  
  <p>so basically my SQL query will be something like this:</p>
  
  <pre><code>select * from `table` WHERE `record_id` IN (1,2,3)
  </code></pre>
  
  <p>and it will return exacly 5 rows.</p>
  
  <p>What i need is to return 2 rows like this:</p>
  
  <pre><code>id  update_date value   record_id
  3   2015-01-03  3       1
  5   2015-02-03  101     2
  </code></pre>
  
  <p>If you take a closer look, those are the ones with the latest update date.
  I need this in a single query, but I am not quite sure it is possible.</p>
  
  <p>Thanks in advance</p>
  
  <p>Note: some record_ids might be missing</p>