使用 case 时显示一种类型的结果

Display one type of result when using case

我正在编写查询以查看客户是否拥有超过 2 台计算机并且我正在使用案例。如何在我的结果中只显示“多台”(多于 1 台计算机)。我不想单独展示

select (CASE WHEN COUNT(DISTINCT computerID) = 1 THEN 'single' 
        WHEN COUNT(DISTINCT computerID) <> 1 THEN 'multiple' 
        END) AS computerIDs
    , count(distinct computerID) as howmanycomputers
    , pjmpsid
from [data]..clientdata
inner join computer with (nolock) on computerID = dccomputerID
where cliententrytime between '2021-06-11 00:00' and '2021-07-12'
group by clientID
order by clientID asc

所以现在我查询 returns 所有具有单个和多个计算机 ID 的客户端。如何修改我的查询以便只显示计算机 ID 的多个结果?

使用 having 子句,例如

HAVING COUNT(DISTINCT computerID) > 1

紧跟在 GROUP BY 之后,即

...
GROUP BY clientID
HAVING COUNT(DISTINCT computerID) > 1
ORDER BY clientID asc