title: group by value but only for continue value
body: <p>OK, the title is far from obvious, I could not explain it better.
  Let's consider the table with columns (date, xvalue, some other columns), what I need is to group them by xvalue but only when they are not interrupted considering time (column date), so for example, for:</p>
  
  <pre><code>      Date |xvalue      |yvalue|
      1 Mar  |10          |1     |
      2 Mar  |10          |2     |
      3 Mar  |20          |6     |
      4 Mar  |20          |1     |
      5 Mar  |10          |4     |
      6 Mar  |10          |2     |
  </code></pre>
  
  <p>From the above data, I would like to get <strong>three</strong> rows, for the first xvalue==10, for xvalue==20 and again for xvalue==10 and for each group aggregate of the other values, for example for sum:</p>
  
  <pre><code>1 Mar, 10, 3
  3 Mar, 20, 7
  5 Mar, 10, 6
  </code></pre>
  
  <p>It's like query:</p>
  
  <pre><code>select min(date), xvalue, sum(yvalue) from t group by xvalue
  </code></pre>
  
  <p>Except above will merge 1,2,5 and 6th of March and I want them separately</p>