AccountItemID  CurrencyID  Amount
     12             2         10
     12             2         20
     12             3         10
     13             2         20
     13             2         10
怎么可以输出以下结果AccountItemID  CurrencyID  Amount
     12             2         30
     12             3         10
     13             2         30
即先根据AccountItemID分组统计 再根据CurrencyID分组
select AccountItemID,CurrencyID,sum(Amount) Amount  from table group by AccountItemID,CurrencyID  这样写不行的