Maximum Subarray Leetcode Practice Sql