MySQL sum() with group by - w3resource - Web development tutorials | w3resource
MySQL SUM() retrieves the sum value of an expression which has undergone a grouping operation by GROUP BY clause. ... Code SELECT cate_id,SUM(total_cost) FROM purchase GROUP BY cate_id; Explanation The above MySQL statement returns ......