SyntaxFix
Write A Post
Hire A Developer
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 ...