title: How to find pairs of events with postgres?
body: <p>I have an events table:</p>
  
  <pre><code>             ts             |  user  | reason 
  ----------------------------+--------+--------
   2018-06-01 10:44:15.52+01  | 359999 | START
   2018-06-01 10:44:29.521+01 | 359999 | STOP
   2018-06-01 10:44:43.52+01  | 359998 | START
   2018-06-01 10:44:55.52+01  | 359999 | START
   2018-06-01 10:44:59.521+01 | 359998 | STOP
   2018-06-01 10:45:07.52+01  | 359999 | STOP
   2018-06-01 10:46:16.52+01  | 359999 | START
  </code></pre>
  
  <p>And I want to find the pairs of events:</p>
  
  <pre><code>  user  |           start            |            stop            
  --------+----------------------------+----------------------------
   359999 | 2018-06-01 10:44:15.52+01  | 2018-06-01 10:44:29.521+01
   359998 | 2018-06-01 10:44:43.52+01  | 2018-06-01 10:44:59.521+01
   359999 | 2018-06-01 10:44:55.52+01  | 2018-06-01 10:45:07.52+01
   359999 | 2018-06-01 10:46:16.52+01  |
  </code></pre>
  
  <p>What sort of query could do this?</p>