I\'m stuck on crafting a MySQL query to solve a problem. I\'m trying to iterate through a list of \"sales\" where I\'m trying to sort the Customer IDs listed by their total accu
You need to GROUP BY your customer id:
GROUP BY
SELECT CustomerID, SUM(PurchasePrice) AS PurchaseTotal FROM sales GROUP BY CustomerID;