Questions
Try with a CASE in this way :
SUM(CASE WHEN PaymentType = "credit card" THEN TotalAmount ELSE 0 END) AS CreditCardTotal,
Should give what you are looking for ...
~ Answered on 2012-01-04 18:39:04