database sum of particular column field each different value
You need to GROUP BY your customer id:
SELECT CustomerID, SUM(PurchasePrice) AS PurchaseTotal
FROM sales
GROUP BY CustomerID;
Customer ID | Purchase price
10 | 1000
10 | 1010
20 | 2111
42 | 9954
10 | 9871
42 | 6121
######### Expecting a result like #######
Customer ID | Purchase Total
10 | 11881
20 | 2111
42 | 16075