這可能是不可能實現的,如果是的話,我將如何重新編寫我的查詢以獲得相同的結果?我不斷收到此錯誤:使用帶查詢語句的子查詢
Msg 130, Level 15, State 1, Line 2 Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
這是我的語法
select
count(case when username in (select username from database0254.dbo.userinformation) then 1 else 0 end) As [Active User]
,count(case when name in (select fullname from database0254.dbo.names) then 1 else 0 end) As [Valid Name]
From users