title: SQLite3 select last event by user
body: <p>I have the following table 'events'.</p>
  
  <pre><code>| id | event_type | by_user | asset |       time |
  |  1 | owner      | a       |    10 | 1111111111 |
  |  2 | updated    | b       |    20 | 1111111112 |
  |  3 | owner      | a       |    30 | 1111111113 |
  |  4 | owner      | c       |    20 | 1111111114 |
  |  5 | updated    | a       |    10 | 1111111115 |
  |  6 | owner      | a       |    20 | 1111111118 |
  </code></pre>
  
  <p>I would like to select the assets where user 'a' was the last user
  with an 'owner' event_type.  So in this example the id's 1, 3 and 6 (the
  assets 10, 20 and 30 are owned by user 'a').</p>
  
  <p>Basically, based on the events, I want to find the assests owned by user 'a'.</p>