How Many Aggregate Functions in SQL SERVER 2008 [Resolved]

Posted by Sabarimahesh under Sql Server on 3/27/2012 | Points: 10 | Views : 12290 | Status : [Member] | Replies : 30
List the aggregate Functions in SQL SERVER 2008

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M



Responses

Posted by: Sksamantaray on: 3/28/2012 [Member] Silver | Points: 50

Up
0
Down

Resolved
There are 12 aggregate functions available in sql:
AVG, MIN, CHECKSUM_AGG, SUM, COUNT, STDEV, COUNT_BIG, STDEVP, GROUPING, VAR, MAX, VARP


Thanks,
Sanjay

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/27/2012 [Member] Bronze | Points: 25

Up
0
Down
link

http://msdn.microsoft.com/en-us/library/ms173454(v=sql.100).aspx

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/27/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar

CONVERT()
RENAME()

These are


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/27/2012 [Member] Bronze | Points: 25

Up
0
Down
what you want to know?

CONVERT()
RENAME()
are not aggregate function

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/27/2012 [Member] Bronze | Points: 25

Up
0
Down
CONVERT()
is a system function and dont have idea about rename, needs to check it.

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar

Syntax

CONVERT(data_type(length),expression,style)


i Dono Whether it is Aggregate Function

That y i rised the question

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Ya, its not a aggregate function.

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
RENAME COLUMN old_name to new_name;

Rajni.Shekhar

Sorry i accept Rename is not aggregate function...



Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar

SQL avg()
SQL count()
SQL first()
SQL last()
SQL max()
SQL min()
SQL sum()
SQL Group By
SQL Having
SQL ucase()
SQL lcase()
SQL mid()
SQL len()
SQL round()
SQL now()
SQL format()

I Dono Where i have to join this function.. Whether in aggregate or normal Function

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar

Then these are all just Function Right

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
I think, there is no function like rename to rename a column, there would be a system procedure called sp_rename to rename column

sp_RENAME 'tblName.columnName', 'columnChangedname' , 'COLUMN'


Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
SQL Group By
SQL Having
are not function.

"Aggregate functions are used to calculate some column values and return a single value."

But all functions are not used to calculate so there are some aggregate functions though these are also system function but defined in one category called aggregate.

SQL avg() -aggregate
SQL count() -aggregate
SQL first() -not used to calculate
SQL last() -not used to calculate
SQL max() -aggregate function
SQL min() -aggregate function
SQL sum() -aggregate function

SQL ucase() -string function
SQL lcase() -string function
SQL mid() - string function
SQL len() -string function
SQL round() - mathmetical function
SQL now() - no idea
SQL format() - no idea




Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

refer this l;ink

http://www.w3schools.com/sql/sql_functions.asp

R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Patel28rajendra

I got it Dude

Thank You

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

for more visit this link


http://msdn.microsoft.com/en-us/library/ms173454.aspx

R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
hi Patel28rajendra,
http://www.w3schools.com:80/sql/sql_functions.asp
nice link. Thanks

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar

i refered from there only

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

Rajni Shekhar

you are welcome


R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi
Rajni Shekhar


you have also posted nice link

thanks

R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

for details and example of all that visit this link

http://www.tipsandtutorials.net/tsql-aggregate-functions-sql-server-2008.html

R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

Sabari Mahesh

please Mark as Answer if it helps

Thanks

R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
thanks.

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Patel28rajendra
Rajni.Shekhar

Thank To all

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/28/2012 [Member] Silver | Points: 25

Up
0
Down
Thanks Sabari

Thanks,
Sanjay

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Sksamantaray

ya Sanja U r Welcome..

and One more thing

SQL now()

SQL format()

These kind of Function are in Wat Categories

Can Yo uCheck And Say

REfer Patel28rajendra w3schools link...

That Function are there

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/28/2012 [Member] Silver | Points: 25

Up
0
Down
There is no such function called now() its {fn Now()} , which is an ODBC canonical function
Format() is comming under String functions.
For more categories:
http://msdn.microsoft.com/en-us/library/ms174318.aspx



Thanks,
Sanjay

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

you are welcome

R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/28/2012 [Member] Bronze | Points: 25

Up
0
Down
Sksamantaray

Ho kk


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/13/2012 [Member] Bronze | Points: 25
Posted by: Muhsinathk on: 6/20/2012 [Member] Bronze | Points: 25

Up
0
Down
AVG
MIN
CHECKSUM_AGG
SUM
COUNT
STDEV
COUNT_BIG
STDEVP
GROUPING
VAR
MAX
VARP


Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response