case count(distinct是什么意思
select
User.ID as UserID,
case count(distinct
case
when Amount>0 or Fee>0 then userid
else null
end
)
when 0 then 0
else 1
end ,
case count( distinct
case IsEnabled
when 1 then userid
else null
end)
when 0 then 0
else 1
end ,
accontID from a.......
这里
case count(distinct
case
when Amount>0 or Fee>0 then userid
else null
end
)
when 0 then 0
else 1
end ,
case count( distinct
case IsEnabled
when 1 then userid
else null
end)
when 0 then 0
else 1
end 是什么意思 ??