基本的に必要なデータは、列に複数の値を持つエンティティの数です。
これは列単位で最も簡単に計算できます:
select sum(case when NumFirstNames <> 1 then 1 else 0 end) as DifferentFirstNames, sum(case when NumLastNames <> 1 then 1 else 0 end) as DifferentLastNames, sum(case when NumSSN <> 1 then 1 else 0 end) as DifferentSSN, sum(case when NumPhone <> 1 then 1 else 0 end) as DifferentPhone from (select EncounterId, count(*) as Num, count(distinct FirstName) as NumFirstNames, count(distinct LastName) as NumLastNames, count(distinct SSN) as NumSSN, count(distinct Phone) as NumPhone from table t group by EncounterId ) e;
プレ>結果は好きなようにフォーマットできます。