title: i have requirement in which column value need to break into two column rangefrom and rangeto
body: <p>I have requirement in which msn column need to break into rangefrom and rangeto
  table</p>
  
  <pre><code>num    msn    date
  
  1ab    5       25/2/2019
  1ab    7       25/2/2019
  1ab    8       25/2/2019
  1ac    8       25/4/2019
  1ad    9       25/5/2019
  1ad    10       25/5/2019
  1ad    11       25/5/2019
  </code></pre>
  
  <p>output should like this if msn is not continuous then same value goes to rangefrom and rangeto if continuous then min value will go to rangefrom and max value will go rangeto based on date and num</p>
  
  <pre><code>num   rangefrom  rangeto   date
  1ab     5         5        25/2/2019
  1ab     7         8        25/2/2019
  1ad     9         11        25/4/2019
  </code></pre>