为什么在SQL Server的"PIVOT"示例中总是存在"SUM"聚合函数 [英] Why there is always 'SUM' aggregate function in examples of 'PIVOT' in SQL server
本文介绍了为什么在SQL Server的"PIVOT"示例中总是存在"SUM"聚合函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
1.在数据透视表中使用聚合函数有什么问题?
2.任何人都可以解释"PIVOT"在SQL Server中的工作原理吗?
我什至在Google上都尝试过,但是不知道如何使用.
我是新来的,希望您能理解.
请专家在那里.
谢谢
DeeBee
1.What is the matter of using aggregate function in pivot?
2.Can anybody explain how the ''PIVOT'' works in SQL server ?
I tried even on Google, but couldn''t understand how to use it.
As I am new here, hope you understand.
Experts out there, Please.
Thank you,
DeeBee
推荐答案
SUM
是最常用的聚合函数,也可以使用AVG,MAX,MIN,COUNT
.
http://social.msdn.microsoft.com/Forums/zh/transactsql/thread/4d6d0acd-fdb9-4961-be34-bc6fa1869ce3 [
SUM
is the most used aggregate function, you can also useAVG,MAX,MIN,COUNT
.
http://social.msdn.microsoft.com/Forums/en/transactsql/thread/4d6d0acd-fdb9-4961-be34-bc6fa1869ce3[^]
这篇关于为什么在SQL Server的"PIVOT"示例中总是存在"SUM"聚合函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文