sql多字段相减///单字段多值

SELECT IFNULL(t.预算金额,0)-IFNULL(t.实使用金额,0)-IFNULL(SUM(f.已审核、待审核总数),0)remainingMoney FROM 表名 t 
LEFT JOIN 关联表名 f ON t.id=f.id
WHERE t.id='' AND f.状态IN(01,02,03)
原文地址:https://www.cnblogs.com/yanchaohui/p/10186077.html