1
leonme 2021-11-25 23:20:48 +08:00
COALESCE(sum(RMB),0)
|
2
akira 2021-11-26 04:58:41 +08:00
我的话 会用 ifnull 之类的
|
3
netnr 2021-11-26 06:29:50 +08:00 via Android
end 换成 else 0 end
|
6
c6h6benzene 2021-11-26 09:24:49 +08:00 via iPhone
SUM(case when abc=‘b’ then RMB else 0 end)
这样? |
7
cando 2021-11-26 09:36:27 +08:00
sum(if(abc='A',RMB,0)) as x,
sum(if(abc='B',RMB,0)) as y |