MySql sum elements of a column
Solution 1:
select sum(A),sum(B),sum(C) from mytable where id in (1,2,3);
Solution 2:
select
sum(a) as atotal,
sum(b) as btotal,
sum(c) as ctotal
from
yourtable t
where
t.id in (1, 2, 3)
Solution 3:
Try this:
select sum(a), sum(b), sum(c)
from your_table