case count(distinct是什么意思

lilinew lilinew 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
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 是什么意思 ??
...全文

相关推荐

评论 8
收藏 已收藏
分享
返回顶部
lilinew
疑难问题 22,298 成员 121,727 内容