mysql sum()函数的使用
对所有数据进行查询,并对其中的department字段值相同的值进行累加查询。SELECT `department` , sum( `item_real` ) , sum( `item_budget` ) , sum( `tuisuan` ) FROM `budget_all`GROUP BY `department`仅仅对department=dd,dt进行求和:select department,sum(item_real),sum(item_budget),sum(tuisuan) from budg
原创
2011-05-19 09:56:00 ·
22330 阅读 ·
0 评论