总结vb.net中的值 [英] Summing the values in vb.net

查看:66
本文介绍了总结vb.net中的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有EmployeesDetails表我需要总结列如

Customer1有3个值1000,1000,1000(3行列名是金额)

Customer2有2个值2000,2000(2行列名相同)

i需要显示值

Customer1 3000

Customer2 4000

任何人都可以帮助

I have EmployeesDetails table i need to sum the columns like
Customer1 has 3 values 1000,1000,1000(3 rows Column name is amount)
Customer2 has 2 values 2000,2000 (2 Rows column name is same amount)
i need to display the values
Customer1 3000
Customer2 4000
can anyone help

推荐答案

尝试:
SELECT Id, SUM(amount) FROM myTable GROUP BY Id


这篇关于总结vb.net中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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