sql summing problem inn sql 2008 [英] sql summing problem inn sql 2008

查看:83
本文介绍了sql summing problem inn sql 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的存储过程输出



圈数

------- -----

circle-1 20



circle-1 10



circle-2 5



现在我要输出为



circle-1 30



circle -2 5

i have a stored procedure output like this

circle count
------- -----
circle-1 20

circle-1 10

circle-2 5

now i want output as

circle-1 30

circle -2 5

推荐答案

尝试

Try
SELECT Circle, SUM(Count) as TotalCount FROM MyTable GROUP BY Circle


这篇关于sql summing problem inn sql 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆