title: different data window for FIRST_VALUE and LAST_VALUE
body: <p>Following query gives strange results. It looks like the default window for FIRST_VALUE is always UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING and for LAST_VALUE is like CURRENT_ROW AND CURRENT_ROW. Why is that?</p>
  
  <pre><code>select 
  to_char(INVOICEDATE,'iw') WEEK,
  SUM(total) AS TOTAL_SUM,
  
  FIRST_VALUE(to_char(INVOICEDATE,'iw')) OVER (order by SUM(total)) minimum,
  FIRST_VALUE(to_char(INVOICEDATE,'iw')) OVER (order by SUM(total) DESC) maximum,
  LAST_VALUE(to_char(INVOICEDATE,'iw')) OVER (order by SUM(total)) max_2,
  LAST_VALUE(to_char(INVOICEDATE,'iw')) OVER (order by SUM(total) ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) max_3
  
  from invoice
  
  WHERE to_char(INVOICEDATE,'iw') &lt; 9
  group by to_char(INVOICEDATE,'iw')
  order by to_char(INVOICEDATE,'iw')
  </code></pre>
  
  <p><strong>Here are the result:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/6I2fg.jpg" alt="HERE ARE THE RESULST"></p>