title: SQL break groups by a condition
body: <p>Suppose I have this table:</p>
  <pre><code>timestamp | is_break | data
  ----------+----------+------
   0        | 1        | 10
   1        | 0        | 20
   2        | 1        | 5
   3        | 1        | 10
   4        | 0        | 20
   5        | 0        | 30
  </code></pre>
  <p>How can I separate the data into groups by the is_break column?</p>
  <p>For example to get the AVG of the data by group such as:</p>
  <pre><code>min_timestamp | avg_data
  --------------+---------
   0            | 15        
   2            | 5
   3            | 20    
  </code></pre>