Click here to Skip to main content
13,152,454 members (38,328 online)
Rate this:
Please Sign up or sign in to vote.
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,

Posted 29-Nov-12 20:06pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

SUM is the most used aggregate function, you can also use AVG,MAX,MIN,COUNT.[^]
Dee_Bee 30-Nov-12 2:14am
Thank a bunch for that, but why to use an aggregate function there? why not just a column name ? as it makes no difference using an aggregate function?

Please help.

Thank you
Mehdi Gholam 30-Nov-12 2:26am
You have to specify what you want done on the data sum,count etc. so you have to write "sum" on the column name.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170924.2 | Last Updated 30 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100