Select SUM(IF(CPaymentType='Check', CAmount, 0)) as PaymentAmountCheck,
SUM(IF(CPaymentType='Cash', CAmount, 0)) as PaymentAmountCash
from TableOrderPayment
where CPaymentType IN ('Check','Cash') and CDate<=SYSDATETIME() and CStatus='Active';
I want to sum PaymentAmountCheck and PaymentAmountCash, can anyone help me please