title: Partitioning in window functions with same value in different chunk of rows
body: <p>In the picture below you can example data. I would like to get first occurence of <em>batch_start</em> for each <em>batch</em>. As you can see (green highlight) batch 1522049 occurs in 2 chunks, one has 2 rows and second has 1 row.</p>
  
  <pre><code>SELECT FIRST_VALUE(batch_start) OVER (PARTITION BY batch ORDER BY batch_start)
  </code></pre>
  
  <p>does not solve the problem, since it joins both chunks into one and result is '2013-01-29 10:27:23' for both of them.</p>
  
  <p>Any idea how to distinguish these rows and get <em>batch_start</em> of each chunk of data?</p>
  
  <p><a href="https://i.stack.imgur.com/X87zk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X87zk.png" alt="Example data"></a></p>