title: SQL: select N “most recent” rows in ascending order
body: <p>For example, if my data look like this:</p>
  
  <pre>
  timestamp | message
  100 | hello
  101 | world
  102 | foo
  103 | bar
  104 | baz
  </pre>
  
  <p>How can I select the three most recent rows — 102, 103, 104 — in ascending order?</p>
  
  <p>The obvious (to me) <code>… LIMIT 3 ORDER BY timestamp DESC</code> will return the correct rows but the order is incorrect.</p>