[SQ] Add last_value and first_value window functions