Generate All Substring Leetcode Problems Sql