Two Pointer Leetcode Problems Sql Commands