title: Tracking current and previous status
body: <p>I have a table which keeps the <strong>status</strong> and <strong>created_timestamp</strong> corresponding to a <strong>process_id</strong>. One row is inserted as soon as the process status changes. So, there are as many rows with same <strong>process_id</strong> as there are statuses associated with it.
  I want to create another <strong>table/view</strong> using this data which has one single row corresponding to a <strong>process_id</strong>, its current status and its previous status. I need to make a Informatica job for this, but a SQL query will be just as helpful. <br>
  Sample Input:</p>
  
  <pre><code>Process_id | Status     | Created 
           1 | In_queue   | 2014-08-01 00:01:01 
           1 | Started    | 2014-08-01 01:03:01 
           1 | In_process | 2014-08-01 01:50:20 
           1 | Complete   | 2014-08-01 03:10:20 
  
  Sample Output: 
  Process_id | Previous_status | Current_status | Updated 
           1 | In_process      | Complete       | 2014-08-01 03:10:20
  </code></pre>