title: Find duration between two timestamp in different rows
body: <pre><code>Row#    TaskID  USerID  Status          TImestamp
  1       1           A   WorkStarted     2019-04-28 07:23:19.508
  2       1           B   WorkStarted     2019-05-28 07:23:19.508 
  3       1           C   WorkStarted     2019-06-28 07:23:19.508
  4       1           A   WorkFInished    2019-05-28 07:23:19.508
  5       1           A   WorkStarted     2019-06-28 07:23:19.508
  6       1           A   WorkFInished    2019-08-28 07:23:19.508
  </code></pre>
  <p>I have above data where a task is getting created and is picked by user on different timestamp and then marked as finished once its done.</p>
  <p>I have to find the duration taken by a user to finish that task i.e. for above scenario I need two records as as task was finished only twice and that too by user A only on different timestamps</p>
  <pre><code>Row#    UserID  Duration
  1       A       1 Day     (Row4timestamp-Row1TImestamp)
  2       A       2 Day     (Row6timestamp-Row5Timesamp)
  </code></pre>