[SQ] Fix for window framing issue, add lead/lag