Longest String With All Prefixes Leetcode Sql Window