答案 0 :(得分:3)
我认为这是mysql:
select s_f_name,s_l_name,SUM(sub_1 + sub_2 + sub_3) as total from tablename group by s_f_name,s_l_name
答案 1 :(得分:2)
试试这个
SELECT s_id, s_f_name, s_l_name, s_roll_no, s_class, SUM(sub_1 + sub_2 + sub_3) AS sum FROM <table name> GROUP BY s_id
输出:
s_id s_f_name s_l_name s_roll_no s_class sum
1 Mridul Kumar 1 1 42
2 Manish Paul 2 1 48
3 Sritima Baneriee 3 1 57