Hi All,
I'm looking for a way to mimic Oracle first_value/last_value functions with DB2.
More precisely the concern is to generate an equivalent for the following piece of SQL:

select t0.KeyCol as T0_KeyCol,
(select last_value(t2.T argetCol) over (order by t2.OrderingCol)
from LogsTable t2 where (t2.KeyCol = t0.KeyCol) and (rownum=1)) as TheLastValue
from BaseTable t0

...