Leetcode Window Function Mysql