Next Smallest Element Leetcode Problems Sql