I have category in a table like
table(cat_name,amount);
How to get the sum of amount each cat_name Grouped by cat_name
amount
cat_name
SELECT cat_name, SUM(amount) AS total_amount FROM table GROUP BY cat_name
2.1m questions
2.1m answers
60 comments
57.0k users