title: selecting top record in ORACLE join statement between subqueries
body: <p>I would like to ask for your help for constructing a single ORACLE SQL statement:</p>
  
  <p>using job table as below</p>
  
  <pre><code>Object | Operation | Time  
  A      | Move      | 12:01  
  B      | Move      | 12:02  
  C      | Pickup    | 12:03  
  D      | Move      | 12:04  
  B      | Pickup    | 12:05  
  </code></pre>
  
  <p>to get the result table as below.</p>
  
  <pre><code>Object | Operation | Time  | Cause  
  A      | Move      | 12:01 | C  
  B      | Move      | 12:02 | C  
  D      | Move      | 12:04 | B 
  </code></pre>
  
  <p>This is to figure out which Pickup operation caused each Move operation.<br>
  "Cause" column must include Object of the pickup job record with smallest time right next to move operation.</p>
  
  <p>I have some ideas as below but do not know how to.<br>
  -. It requires join statement between subquery for Move and subquery for Pickup<br>
  -. Subquery for Pickup must be partitioned by move record to be joined<br>
  -. Must select top record only from each partition of Pickup subquery  </p>