2021-02-24
阅读量:
1048
sum case when和count case when有什么区别

count(case when t.ride_num=1 then 1 end ) as ride_1_times then=1,
两者的查询结果相同,但sum 中case when de else 需要为0,而count case when 的else需要设定为null或者不写。count默认不统计null ,不能为0.
55.5627
2
0
关注作者
收藏
评论(0)
发表评论
暂无数据

