Maximum Repeating Substring Leetcode Sql Queries