- No explicit
respect nullsclause
The last_value(...) window function evaluates its argument using the last row defined by the over clause:
SELECT LAST_VALUE(<expr>) OVER (ORDER BY ...)
FROM ...Default Framing Applies
If there is no explicit framing clause the following default applies:
RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROWThat means, the last_value() function cannot see beyond the ties to the current row. Open the frame to bring the last row into reach:
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWINGRelated
Normative References
The last_value() window function is defined in ISO/IEC 9075-2:2023 as part of optional feature T617, "FIRST_VALUE and LAST_VALUE functions".