Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
id| name total 1 | meow 1 2 | meow 2 3 | raf 5 4 | meow 5 5 | raf 5
我想要一个结果
喵=8 皇家空军=10
SELECT name, SUM(total) total_sum FROM tablename GROUP BY name
您可以使用一组名称来获得单独的总和
select name, sum(total) as totals from your_table group by name