选出id和name都相等的行,pass的值为和
select id,name,sum(pass) from tb_test group by id,name
https://ke.qq.com/course/165866 这有html php mysql的视频你看一下,希望可以帮助到你