问题描述
我有一个包含以下数据的表
cnt_num .....点
1 .............. 500
1 .............. 1000
2 .............. 111
2 .............. 100
1 .............. 55
我需要将输出作为
cnt_num ..... total_points .... num_activity(row_count)
1 .................. 1555 ................................ 3
2 .................. 211 ................................. 2
我是数据库新手,一直在寻找解决方案.
任何帮助表示赞赏.在此先感谢
i have a table with following data
cnt_num .....points
1.............. 500
1.............. 1000
2.............. 111
2.............. 100
1.............. 55
i need to get output as
cnt_num .....total_points....num_activity (row_count)
1.................. 1555.......................3
2 ..................211........................2
i am new in database and have been searching allover for solution.
any help is appreciated. thanks in advance
这篇关于如何获取数据库中的总和和行数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!