slno state district company
1 a ab abc
2 a ab ac
3 a ab abc
4 a ab abc
5 a ab abc
6 a ab ac
输出
state district company sumzz
a ab abc 4
a ab ac 2
我试过的
select state,district,company,sum(company) as sumzz from company
如何实现基于不同公司的显示最后一行?