sql查询一张表中不同类别的和

select itemCode,sum(generateMoney) as totalmoney from inf_balance where vehiclecode='VC12114257' group by ItemCode

 

使用groupby

 

posted @ 2012-12-25 11:12  Uoolo  阅读(350)  评论(0编辑  收藏  举报