MediumConceptSQL patterns for engineers
What does FIRST_VALUE or LAST_VALUE return and what is the frame trap?
What a good answer covers
They return the first or last value in the window frame. With ORDER BY the default frame ends at the current row, so LAST_VALUE returns the current row unless you set the frame to UNBOUNDED FOLLOWING.
PreviousWhat is the difference between a view and a materialised view?Next How do you pivot rows to columns in SQL?