下面是我想优化的sql查询。ISNULL((SELECT SUM(Amount) FROM tblPayment WHERE TransactionType = 1 and AccountType = 2 and Status = 3)ISNULL((SELECT SUM(Amount) FROM tblPayment WHERE TransactionType = 2 and AccountType = 2 and Status = 3),0)如何以更
WHERE (status IN (1,2,3) OR status IN (3,4,5)) AND ... AND status IN (2,3)SELECT ... FROM ...AND status IN (2,3)我是对还是错?手动优化第一个查询到第二个查询是否有好处,或者我可以依赖SQL引擎?