select (case A when '物业管理费' then B end) as 物业管理费,
(case A when '停车费' then B end) as 停车费,
(case A when '其他' then B end) as 其他
from (select (case when (A<>'停车费' or A<>'物业管理费')
then '其他'
else A end ) as A,
sum(B) as B
from 表
group by (case when (A<>'停车费' or A<>'物业管理费')
then '其他'
else A end ) )
select (case when (A<>'停车费' and A<>'物业管理费')
then '其他'
else A end ) as A,
sum(B) as B
from 表
group by (case when (A<>'停车费' and A<>'物业管理费')
then '其他'
else A end )