Count Distinct Element Leetcode Sql Server