title: Last_value window function doesn't work properly
body: <p><code>Last_value</code> window function <code>doesn't</code> work properly. </p>
  
  <pre><code>CREATE TABLE EXAMP2
  (
    CUSTOMER_ID  NUMBER(38)                       NOT NULL,
    VALID_FROM   DATE                             NOT NULL
  );
  
  
  Customer_id      Valid_from
  -------------------------------------
   9775             06.04.2013 01:34:16
   9775             06.04.2013 20:34:00
   9775             12.04.2013 11:07:01
  --------------------------------------
  
  select DISTINCT LAST_VALUE(VALID_FROM) 
    OVER (partition by customer_id ORDER BY VALID_FROM ASC) rn 
  from   examp1;
  </code></pre>
  
  <p>When I use <code>LAST_VALUE</code> then I get following rows:</p>
  
  <pre><code>06.04.2013 20:34:00
  06.04.2013 01:34:16
  12.04.2013 11:07:01
  </code></pre>
  
  <p>When I use <code>FIRST_VALUE</code> then I get following rows:</p>
  
  <pre><code>select  DISTINCT FIRST_VALUE(VALID_FROM) 
  OVER (partition by customer_id ORDER BY VALID_FROM DESC) rn 
  from   examp1;
  
  4/12/2013 11:07:01 AM
  </code></pre>
  
  <p><code>First_value</code> query gives correct output. I hoped to get same output from these queries.   Why do I have <code>2 different results</code>?</p>