Minimum Array End Leetcode Sql Problems