Count Distinct Substrings Leetcode Sql Solutions