title: How to get starting value and end value of particular transcation
body: <p>input : </p>
  
  <pre><code>+------+------------+--------------+------------+
  | NAME | Date       | Amount_start | Amount_END |
  +------+------------+--------------+------------+
  | AAA  | 2016-10-06 |      20      |      4     |
  | AAA  | 2016-10-07 |      30      |      6     |
  | AAA  | 2016-10-08 |       7      |      8     |
  | AAA  | 2016-10-09 |     380      |      9     |
  | ...  | ...        |     ...      |    ...     |
  | ZZZ  | 2016-10-06 |      10      |     20     |
  | ZZZ  | 2016-10-07 |      11      |      6     |
  +------+------------+--------------+------------+
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>+------+--------------+------------+
  | NAME | Amount_start | Amount_END |
  +------+--------------+------------+
  | AAA  |       20     |      9     |
  | ...  |      ...     |    ...     |
  | ZZZ  |       10     |      6     |
  +------+--------------+------------+
  </code></pre>
  
  <p>output : In one row need to take Amount_start of starting date and 
      Amount_end of End date of that employee  </p>