SELECT cat_name, SUM(amount) AS total_amountFROM tableGROUP BY cat_name
SELECT cat_name, SUM(amount) AS TotalAmountFROM TableGROUP BY cat_name