I have a table called Billing that holds all a stores transactions. I use the following query to figure out totals based on each payment method (Cash, Visa, Debit, etc.).
SELECT Sum(IIF(isnull(paid),0,paid) + IIF(isnull(provided),0,provided)) AS totalpaid, method AS typepaid
FROM Billing
GROUP...