I\'m trying to get \'Cash\', \'Check\' and \'Credit Card\' totals in new columns based on ProductID from the same table.
Table - Payments
+---------
I think you're making this a bit more complicated than it needs to be.
SELECT ProductID, SUM(IF(PaymentMethod = 'Cash', Amount, 0)) AS 'Cash', -- snip SUM(Amount) AS Total FROM Payments WHERE SaleDate = '2012-02-10' GROUP BY ProductID