Next Smaller Element Leetcode Practice Sql