select itemCode,sum(generateMoney) as totalmoney from inf_balance where vehiclecode='VC12114257' group by ItemCode
使用groupby
select itemCode,sum(generateMoney) as totalmoney from inf_balance where vehiclecode='VC12114257' group by ItemCode
使用groupby
转载于:https://www.cnblogs.com/wuchao/archive/2012/12/25/2832026.html