select  名称  ,sum(金额)  
from (select distinct 名称  ,金额 from yourTable) as TableA
group by 名称