求满足条件的总和SQL语句

时间:2020-03-21 03:06:39   收藏:0   阅读:57
//求类型为1的总和
SUM(
CASE a.problemType
WHEN 1 THEN
1
ELSE
0
END )

case 字段 when 条件 then 值1 else 值2 end 语句

原文:https://www.cnblogs.com/drawStart/p/12535816.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!