sql sum 与 case 结合

SUM(CASE WHEN kuangid = 2 THEN DayFact ELSE 0 END)
原文地址:https://www.cnblogs.com/windphoenix/p/1574271.html