Shouldn't first_value() ordered descending give the same results as last_value() ordered ascending? I ran the following query and got the results attached below the query.
select random_date, trunc(random_date,'MM') random_month, random_value,
first_value(random_value) over (partition by trunc(random_date,'MM') order by random_date desc) first_,
last_value(random_value) over (partition by trunc(random_date,'MM') order by random_date) last_
from
(select to_date(round (dbms_random.value (1, 28))
|| '-'
|| round (dbms_random.value (02, 03))
|| '-'
|| round (dbms_random.value (2014, 2014)),
'DD-MM-YYYY') + level - 1 random_date,
round(100*(dbms_random.value)) random_value
from dual
connect by level <= 10) order by 2, 1;