Reverse Integer Problem Leetcode Interview Sql Queries