count distinct partition by sql server