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