Number Of Substrings Hackerrank Solution Sql