I need sum column by column in MySQL.
First SUM(column_1)
and show your TOTAL in final row.
Second SUM(column_2)
and show your TOTAL in final row.
I need sum column by column in MySQL.
First SUM(column_1)
and show your TOTAL in final row.
Second SUM(column_2)
and show your TOTAL in final row.
Use this command to perform aggregation in Mysql.
select sum(A) as TotalA, sum(B) as TotalB ,sum(C) as TotalC from mytable
for the last line
LIMIT 1 // <--- Add
Also : I found this while looking for a better result for you. MySql sum elements of a column