私が正しく理解していれば、union all
を使用できます 各列の合計を計算してから、order by
およびlimit
:
select c.*
from ((select 'col1', sum(col1) as s from t) union all
(select 'col2', sum(col2) as s from t) union all
. . .
(select 'col10', sum(col10) as s from t)
) c
order by s desc
limit 3;